This commit is contained in:
Guilhem
2025-05-15 10:42:47 +02:00
parent 42dc9a549b
commit dddcb596c8

View File

@@ -40,9 +40,8 @@
}
async function getMenuElements(): Promise<HTMLElement[]> {
return Array.from(
document.querySelectorAll(`[data-melt-menu-id="${$menuId}"]`)
) as HTMLElement[]
const element = document.getElementById($menuId)
return element ? [element as HTMLElement] : []
}
</script>