From eb04178e3395992f60a3c05e592bc0a5442ea651 Mon Sep 17 00:00:00 2001 From: AustinMroz Date: Tue, 9 Dec 2025 22:19:53 -0800 Subject: [PATCH] Fix compatibility with older browsers (#7205) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- src/lib/litegraph/src/LGraphNode.ts | 13 ++++++------- tsconfig.json | 1 - 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/lib/litegraph/src/LGraphNode.ts b/src/lib/litegraph/src/LGraphNode.ts index 78369fa5d..f87c1ceae 100644 --- a/src/lib/litegraph/src/LGraphNode.ts +++ b/src/lib/litegraph/src/LGraphNode.ts @@ -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++] + } } } diff --git a/tsconfig.json b/tsconfig.json index e490ca672..ae06ca3d1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,7 +6,6 @@ "lib": [ "ES2023", "ES2023.Array", - "ESNext.Iterator", "DOM", "DOM.Iterable" ],