Comfy-Org / Comfy-Org/ComfyUI_frontend

Fix copy/paste logic bug in LGraph execution loop (checks onExecute, calls doExecute)

Open
#11,070 2 comments 0 reactions 0 assignees View on GitHub
audit:half-implemented code-audit effort:small priority:recommended
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.