mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-03 06:47:33 +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
|
||||
const ownerDocument = (options.event?.target as Node).ownerDocument
|
||||
const ownerDocument = (options.event?.target as Node)?.ownerDocument
|
||||
const root_document = ownerDocument || document
|
||||
|
||||
if (root_document.fullscreenElement)
|
||||
|
||||
Reference in New Issue
Block a user