From 47eb20cb4428ba93105b3f1b215cd242134e729c Mon Sep 17 00:00:00 2001 From: Guillaume Chau Date: Mon, 8 Jan 2024 12:23:49 +0100 Subject: [PATCH] fix: `Element' is not defined on server --- packages/floating-vue/src/components/PopperWrapper.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/floating-vue/src/components/PopperWrapper.vue b/packages/floating-vue/src/components/PopperWrapper.vue index c9cc42b4..65539f5a 100644 --- a/packages/floating-vue/src/components/PopperWrapper.vue +++ b/packages/floating-vue/src/components/PopperWrapper.vue @@ -69,6 +69,11 @@ import ThemeClass from './ThemeClass' export type TriggerEvent = 'hover' | 'click' | 'focus' | 'touch' +let Element: any = function () {} +if (typeof window !== 'undefined') { + Element = window.Element +} + export default defineComponent({ name: 'VPopperWrapper',