From 4cbf12849e9026a98928b34a682ae143033c5e6c Mon Sep 17 00:00:00 2001 From: Chenlei Hu Date: Sun, 2 Mar 2025 21:21:39 -0500 Subject: [PATCH] [BugFix] Fix add node via context menu (2) (#689) https://github.com/Comfy-Org/litegraph.js/pull/647 failed to convert `return` to `continue` when converting forEach to for-lop. --- src/LGraphCanvas.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/LGraphCanvas.ts b/src/LGraphCanvas.ts index cb016a034..cfd563d71 100644 --- a/src/LGraphCanvas.ts +++ b/src/LGraphCanvas.ts @@ -852,7 +852,7 @@ export class LGraphCanvas implements ConnectionColorContext { const entries: AddNodeMenu[] = [] for (const category of categories) { - if (!category) return + if (!category) continue const base_category_regex = new RegExp(`^(${base_category})`) const category_name = category @@ -886,7 +886,7 @@ export class LGraphCanvas implements ConnectionColorContext { ) for (const node of nodes) { - if (node.skip_list) return + if (node.skip_list) continue const entry: AddNodeMenu = { value: node.type,