diff --git a/src/components/Tippy.ts b/src/components/Tippy.ts index d7aec03..9a9e813 100644 --- a/src/components/Tippy.ts +++ b/src/components/Tippy.ts @@ -81,7 +81,7 @@ const TippyComponent = defineComponent({ let target: any = elem if (props.to) { - if (props.to instanceof Element) { + if (typeof Element !== 'undefined' && props.to instanceof Element) { target = () => props.to } else if (typeof props.to === 'string' || props.to instanceof String) { target = () => document.querySelector(props.to)