Skip to content

Commit 9bfc9b7

Browse files
authored
Add additional check when restoring widgets_values (#6054)
Prior to #6014, I had identified and started on #6015 to resolve what I believed to be a larger class of issues. While the issue I was solving produced the same error log on the same line, I misunderstood the circumstances in which the reported issue would occur. As proxyWidgets do not have their own value, only linked widgets should have their value restored from `widgets_values`. This PR adds an additional check both that the property entry is within bounds, and that the property entry is for a linked widget. See #6014 A potential additional issue is still being investigated. - Additional issue seems unrelated to fix here. Will leave issue open, but recommend merging this as is to not block v1.28.7 ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6054-Add-additional-check-when-restoring-widgets_values-28c6d73d365081489d29fc9723132db0) by [Unito](https://www.unito.io)
1 parent 7355a51 commit 9bfc9b7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/core/graph/subgraph/proxyWidget.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ const onConfigure = function (
119119
this.properties.proxyWidgets = serialisedNode.properties.proxyWidgets
120120
const parsed = parseProxyWidgets(serialisedNode.properties.proxyWidgets)
121121
serialisedNode.widgets_values?.forEach((v, index) => {
122+
if (parsed[index]?.[0] !== '-1') return
122123
const widget = this.widgets.find((w) => w.name == parsed[index][1])
123124
if (v !== null && widget) widget.value = v
124125
})

0 commit comments

Comments
 (0)