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) {
const widgetsWithValue = this.widgets
.values()
.filter((w) => w.serialize !== false)
.filter((_w, idx) => idx < info.widgets_values!.length)
widgetsWithValue.forEach(
(widget, i) => (widget.value = info.widgets_values![i])
)
let i = 0
for (const widget of this.widgets ?? []) {
if (widget.serialize === false) continue
if (i >= info.widgets_values.length) break
widget.value = info.widgets_values[i++]
}
}
}

View File

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