[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.
This commit is contained in:
Chenlei Hu
2025-03-02 21:21:39 -05:00
committed by GitHub
parent 9af4ee120c
commit 4cbf12849e

View File

@@ -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,