Fix compatibility with older browsers (#7205)

Resolves #7174

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7205-Fix-compatibility-with-older-browsers-2c16d73d365081fcaa3ce2693107791a)
by [Unito](https://www.unito.io)
This commit is contained in:
AustinMroz
2025-12-09 22:19:53 -08:00
committed by GitHub
parent b88d96d6cc
commit eb04178e33
2 changed files with 6 additions and 8 deletions

View File

@@ -860,13 +860,12 @@ export class LGraphNode
} }
if (info.widgets_values) { if (info.widgets_values) {
const widgetsWithValue = this.widgets let i = 0
.values() for (const widget of this.widgets ?? []) {
.filter((w) => w.serialize !== false) if (widget.serialize === false) continue
.filter((_w, idx) => idx < info.widgets_values!.length) if (i >= info.widgets_values.length) break
widgetsWithValue.forEach( widget.value = info.widgets_values[i++]
(widget, i) => (widget.value = info.widgets_values![i]) }
)
} }
} }

View File

@@ -6,7 +6,6 @@
"lib": [ "lib": [
"ES2023", "ES2023",
"ES2023.Array", "ES2023.Array",
"ESNext.Iterator",
"DOM", "DOM",
"DOM.Iterable" "DOM.Iterable"
], ],