Skip to content

Bug: Early return skips remaining edge changes in batch #2491

@toyamarinyon

Description

@toyamarinyon

Bug: Early return skips remaining edge changes in batch

In handleEdgesChange, when a connection is not found during a "remove" operation, the return statement at line 384 exits the entire callback function rather than just skipping to the next change in the loop. If ReactFlow batches multiple edge changes (e.g., deleting multiple edges at once) and one connection lookup fails, all subsequent changes in the changes array will be silently skipped. This should be break (to exit the switch and continue the loop) or continue (to skip directly to the next iteration) instead of return.

Fix in Cursor Fix in Web

Originally posted by @cursor[bot] in #2486 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions