fix: iterate the open overlays with Array.from so the type check passes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Guilhem Lemouel
2026-10-30 05:38:01 -07:00
co-authored by Claude Opus 5.5
parent 50d48489b8
commit 65f6ecfd39
@@ -11,7 +11,7 @@ const OVERLAY =
export function isComposerOverlay(target: EventTarget | null): boolean {
if (target instanceof Element && target.closest(OVERLAY)) return true
// An inert one is closed but kept mounted: the hidden sidebar's floating card is a dialog.
return [...document.querySelectorAll(OVERLAY)].some((el) => !el.closest('[inert]'))
return Array.from(document.querySelectorAll(OVERLAY)).some((el) => !el.closest('[inert]'))
}
/** Whether a pointer-down outside the composer leaves it open: it is on a control that brings