From 02b3509c48b456ebbd8fb855c9b12fdb77b01608 Mon Sep 17 00:00:00 2001 From: Comfy Org PR Bot Date: Tue, 16 Dec 2025 04:32:26 +0900 Subject: [PATCH] [backport core/1.34] Fix compatibility with older browsers (#7506) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport of #7205 to `core/1.34` Automatically created by backport workflow. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7506-backport-core-1-34-Fix-compatibility-with-older-browsers-2ca6d73d36508177bb41fa59ce6d9563) by [Unito](https://www.unito.io) Co-authored-by: AustinMroz --- 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 88f113a4c..961d30911 100644 --- a/src/lib/litegraph/src/LGraphNode.ts +++ b/src/lib/litegraph/src/LGraphNode.ts @@ -851,13 +851,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" ],