From cb40da612bdfc042a38571203f73bc491db88ebd Mon Sep 17 00:00:00 2001 From: AustinMroz Date: Sat, 11 Oct 2025 23:09:29 -0700 Subject: [PATCH] Safer restoration of widgets_values on subgraph nodes (#6015) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reordering linked widgets requires special attention on load to restore widgets_values. The method which was merged was optimistic and insufficient for some rarer edge cases. Resolves #6014 Fix was already included in #6009. Backport is not required. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6015-Safer-restoration-of-widgets_values-on-subgraph-nodes-2896d73d3650813a9162e8459e686981) by [Unito](https://www.unito.io) --- src/core/graph/subgraph/proxyWidget.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/core/graph/subgraph/proxyWidget.ts b/src/core/graph/subgraph/proxyWidget.ts index 65191e828..74e0c733d 100644 --- a/src/core/graph/subgraph/proxyWidget.ts +++ b/src/core/graph/subgraph/proxyWidget.ts @@ -115,11 +115,14 @@ const onConfigure = function ( this.arrange() } }) - if (serialisedNode.properties?.proxyWidgets) + if (serialisedNode.properties?.proxyWidgets) { this.properties.proxyWidgets = serialisedNode.properties.proxyWidgets - serialisedNode.widgets_values?.forEach((v, index) => { - if (v !== null) this.widgets[index].value = v - }) + const parsed = parseProxyWidgets(serialisedNode.properties.proxyWidgets) + serialisedNode.widgets_values?.forEach((v, index) => { + const widget = this.widgets.find((w) => w.name == parsed[index][1]) + if (v !== null && widget) widget.value = v + }) + } } function newProxyWidget(