From 4589938ceb34742ca6fe62ffcb4f95154750958f Mon Sep 17 00:00:00 2001 From: filtered <176114999+webfiltered@users.noreply.github.com> Date: Mon, 10 Mar 2025 19:55:51 +1100 Subject: [PATCH] [TS] Fix invalid type assertion (#731) - Follow-up on #728 --- src/ContextMenu.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ContextMenu.ts b/src/ContextMenu.ts index d1889fb34..8b3c2170d 100644 --- a/src/ContextMenu.ts +++ b/src/ContextMenu.ts @@ -139,7 +139,7 @@ export class ContextMenu { }) // insert before checking position - const ownerDocument = (options.event?.target as Node)?.ownerDocument + const ownerDocument = (options.event?.target as Node | null | undefined)?.ownerDocument const root_document = ownerDocument || document if (root_document.fullscreenElement)