wip bsky client for the web & android
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142diff --git a/src/components/UI/BasePopover.vue b/src/components/UI/BasePopover.vueindex 89a50e1..1251ba2 100644--- a/src/components/UI/BasePopover.vue+++ b/src/components/UI/BasePopover.vue@@ -38,13 +38,30 @@ const emit = defineEmits<{ (e: 'close'): void }>() -const unwrapToElement = (maybeEl: unknown): HTMLElement | null => {- if (!maybeEl) return null-+function unwrapToElement(maybeEl: unknown): HTMLElement | null { if (maybeEl instanceof HTMLElement) return maybeEl- if (maybeEl.$el instanceof HTMLElement) return maybeEl.$el as HTMLElement- if (maybeEl.$el?.value instanceof HTMLElement) return maybeEl.$el.value as HTMLElement- if (maybeEl.value instanceof HTMLElement) return maybeEl.value as HTMLElement++ if (maybeEl && typeof maybeEl === 'object') {+ const obj = maybeEl as Record<string, unknown>++ if ('$el' in obj) {+ const $el = (obj as { $el?: unknown }).$el+ if ($el instanceof HTMLElement) return $el+ if ($el && typeof $el === 'object' && 'value' in ($el as Record<string, unknown>)) {+ const v = ($el as { value?: unknown }).value+ if (v instanceof HTMLElement) return v+ }+ }++ if ('value' in obj) {+ const v = (obj as { value?: unknown }).value+ if (v instanceof HTMLElement) return v+ if (v && typeof v === 'object' && '$el' in (v as Record<string, unknown>)) {+ const nested = (v as { $el?: unknown }).$el+ if (nested instanceof HTMLElement) return nested+ }+ }+ } return null }