From 6e4b8619fcb5b1327df2b83a19dbc047376828fa Mon Sep 17 00:00:00 2001 From: Austin Date: Mon, 18 May 2026 20:27:40 -0700 Subject: [PATCH] Fix test --- src/core/graph/widgets/dynamicWidgets.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/graph/widgets/dynamicWidgets.ts b/src/core/graph/widgets/dynamicWidgets.ts index ed1dd7a2a2..3aa1f53cbd 100644 --- a/src/core/graph/widgets/dynamicWidgets.ts +++ b/src/core/graph/widgets/dynamicWidgets.ts @@ -11,6 +11,7 @@ import type { LGraphNode } from '@/lib/litegraph/src/LGraphNode' import { LiteGraph } from '@/lib/litegraph/src/litegraph' import type { LLink } from '@/lib/litegraph/src/LLink' import { commonType } from '@/lib/litegraph/src/utils/type' +import { resolveNodeRootGraphId } from '@/lib/litegraph/src/utils/widget' import { transformInputSpecV1ToV2 } from '@/schemas/nodeDef/migration' import type { ComboInputSpec, InputSpec } from '@/schemas/nodeDefSchema' import type { InputSpec as InputSpecV2 } from '@/schemas/nodeDef/nodeDefSchemaV2' @@ -186,8 +187,11 @@ function dynamicComboWidget( //A little hacky, but onConfigure won't work. //It fires too late and is overly disruptive let widgetValue = widget.value + const graphId = resolveNodeRootGraphId(node) const getState = () => - useWidgetValueStore().getWidget(app.rootGraph.id, node.id, widget.name) + graphId + ? useWidgetValueStore().getWidget(graphId, node.id, widget.name) + : undefined Object.defineProperty(widget, 'value', { get() { return getState()?.value ?? widgetValue