diff --git a/src/lib/litegraph/src/LGraphNode.ts b/src/lib/litegraph/src/LGraphNode.ts index 17fce3eddd..65d77de65d 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 e490ca6722..ae06ca3d11 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,7 +6,6 @@ "lib": [ "ES2023", "ES2023.Array", - "ESNext.Iterator", "DOM", "DOM.Iterable" ],