Fix TypeError thrown (#1461)

Missing node type + reroute linked
This commit is contained in:
filtered
2024-11-08 12:17:16 +11:00
committed by GitHub
parent f0b735f3dd
commit 45380f7ca0

View File

@@ -414,7 +414,7 @@ class PrimitiveNode extends LGraphNode {
}
export function getWidgetConfig(slot) {
return slot.widget[CONFIG] ?? slot.widget[GET_CONFIG]()
return slot.widget[CONFIG] ?? slot.widget[GET_CONFIG]?.() ?? ['*', {}]
}
function getConfig(widgetName) {
@@ -590,7 +590,7 @@ export function mergeIfValid(
config1?: unknown
) {
if (!config1) {
config1 = output.widget[CONFIG] ?? output.widget[GET_CONFIG]()
config1 = getWidgetConfig(output)
}
if (config1[0] instanceof Array) {