mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-29 10:42:44 +00:00
Fix downstream extension context menu does not load (#728)
- Adds optional chaining for event target
This commit is contained in:
@@ -139,7 +139,7 @@ export class ContextMenu<TValue = unknown> {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// insert before checking position
|
// insert before checking position
|
||||||
const ownerDocument = (options.event?.target as Node).ownerDocument
|
const ownerDocument = (options.event?.target as Node)?.ownerDocument
|
||||||
const root_document = ownerDocument || document
|
const root_document = ownerDocument || document
|
||||||
|
|
||||||
if (root_document.fullscreenElement)
|
if (root_document.fullscreenElement)
|
||||||
|
|||||||
Reference in New Issue
Block a user