HTMLElement is not defined

This commit is contained in:
Farnabaz
2025-04-22 10:14:11 +02:00
parent 02f0847732
commit 6e3c3ba186

View File

@@ -6,7 +6,7 @@ export function usePortal(portal: Ref<string | HTMLElement | boolean | undefined
const portalTarget = inject(portalTargetInjectionKey, undefined)
const to = computed(() => {
if (typeof portal.value === 'string' || portal.value instanceof HTMLElement) {
if (typeof portal.value === 'string' || portal.value) {
return portal.value
}