mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-24 00:34:09 +00:00
Stricter return value check on LGraphCanvas.getExtraMenuOptions (#401)
This commit is contained in:
@@ -8061,7 +8061,7 @@ export class LGraphCanvas {
|
||||
}
|
||||
|
||||
const extra = this.getExtraMenuOptions?.(this, options)
|
||||
return extra
|
||||
return Array.isArray(extra)
|
||||
? options.concat(extra)
|
||||
: options
|
||||
}
|
||||
@@ -8159,7 +8159,7 @@ export class LGraphCanvas {
|
||||
if (outputs?.length) options[1].disabled = false
|
||||
|
||||
const extra = node.getExtraMenuOptions?.(this, options)
|
||||
if (extra) {
|
||||
if (Array.isArray(extra) && extra.length > 0) {
|
||||
extra.push(null)
|
||||
options = extra.concat(options)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user