fix: skip PromotedWidgetSlot when setting promoted flag in subgraph-opened handler

PromotedWidgetSlot overrides promoted as a getter-only property, causing a TypeError when the subgraph-opened handler tried to set it.

Amp-Thread-ID: https://ampcode.com/threads/T-019c5585-480f-7523-96a7-f624a6689c1e
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Alexander Brown
2026-02-12 21:47:27 -08:00
parent 5fea1ec3a1
commit 0885ce742a

View File

@@ -29,6 +29,7 @@ export function registerPromotedWidgetSlots(canvas: LGraphCanvas) {
const proxyWidgets = parseProxyWidgets(fromNode.properties.proxyWidgets)
for (const node of subgraph.nodes) {
for (const widget of node.widgets ?? []) {
if (widget instanceof PromotedWidgetSlot) continue
widget.promoted = proxyWidgets.some(
([n, w]) => node.id == n && widget.name == w
)