Show object widget values as string on missing nodes (#3294)

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Chenlei Hu
2025-03-31 20:55:50 -04:00
committed by GitHub
parent aea4493b4d
commit 854501ef27
3 changed files with 10 additions and 2 deletions

View File

@@ -51,7 +51,10 @@
0.85, 0.85,
false, false,
false, false,
"" "",
{
"foo": "bar"
}
] ]
} }
], ],

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 58 KiB

View File

@@ -29,7 +29,12 @@ function addWidgetFromValue(node: LGraphNode, value: unknown) {
name: 'UNKNOWN' name: 'UNKNOWN'
}) })
} else { } else {
console.warn(`Unknown value type: ${typeof value}`) widget = StringWidget(node, {
type: 'STRING',
name: 'UNKNOWN',
multiline: true
})
widget.value = JSON.stringify(value)
return return
} }