Comfy-Org / Comfy-Org/ComfyUI_frontend
Fix copy/paste logic bug in LGraph execution loop (checks onExecute, calls doExecute)
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 699
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 490
Description
## Recommendation
### 🔧 FIX: Acknowledged Logic Bug
`src/lib/litegraph/src/LGraph.ts:582` contains an acknowledged bug marked with `FIXME`:
> FIXME: Looks like copy/paste broken logic - checks for "on", executes "do"
The conditional checks for `onExecute` but then calls `doExecute`, which appears to be a copy/paste error.
## What Was Found
The graph execution loop has inconsistent logic where the condition checks one method but executes another. This was flagged inline by a developer but never fixed.
## How to Fix
Review the conditional and make it consistent — either check and call `onExecute` or check and call `doExecute`, depending on the intended behavior.
---
**Category:** Half-Implemented / Bug | **Priority:** Recommended | **Effort:** Small
Part of #11022
_Filed by repo-audit skill_
┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-11070-Fix-copy-paste-logic-bug-in-LGraph-execution-loop-checks-onExecute-calls-doExecute-33e6d73d3650816db1d2f5e6d1ad087b) by [Unito](https://www.unito.io)
Contributor guide
Assessment
This issue has not been assessed yet.