Compare commits

...

4 Commits

Author SHA1 Message Date
Kelly Yang
06e5fd4a08 Merge branch 'main' into fix/lgraph-execution-loop-check 2026-04-24 10:27:21 -07:00
Kelly Yang
522095b79f Merge branch 'main' into fix/lgraph-execution-loop-check 2026-04-23 21:14:10 -07:00
Kelly Yang
777163f419 fix: unify execution paths to use doExecute consistently
Both the do_not_catch_errors and catch-errors branches now call
doExecute (with onExecute guard) instead of onExecute directly.
This ensures execute_triggered visual feedback and onAfterExecuteNode
are triggered consistently regardless of error-catching mode.
2026-04-23 15:53:24 -07:00
Kelly Yang
e9c397c0c0 fix: remove redundant onExecute check in do_not_catch_errors execution path
doExecute() already guards with its own internal onExecute check,
making the outer && node.onExecute redundant. Both branches now
consistently check only node.mode before dispatching execution.
2026-04-23 15:44:20 -07:00

View File

@@ -579,9 +579,7 @@ export class LGraph
for (let i = 0; i < num; i++) {
for (let j = 0; j < limit; ++j) {
const node = nodes[j]
// FIXME: Looks like copy/paste broken logic - checks for "on", executes "do"
if (node.mode == LGraphEventMode.ALWAYS && node.onExecute) {
// wrap node.onExecute();
node.doExecute?.()
}
}
@@ -597,8 +595,8 @@ export class LGraph
for (let i = 0; i < num; i++) {
for (let j = 0; j < limit; ++j) {
const node = nodes[j]
if (node.mode == LGraphEventMode.ALWAYS) {
node.onExecute?.()
if (node.mode == LGraphEventMode.ALWAYS && node.onExecute) {
node.doExecute?.()
}
}