Skip to content

fix: add null guard to redo() to match undo() pattern#328

Merged
pradeeban merged 1 commit intoControlCore-Project:devfrom
avinxshKD:fix/redo-null-guard
Feb 20, 2026
Merged

fix: add null guard to redo() to match undo() pattern#328
pradeeban merged 1 commit intoControlCore-Project:devfrom
avinxshKD:fix/redo-null-guard

Conversation

@avinxshKD
Copy link

fixes #327

redo() was calling getGraphFun(state).redo() without checking if the graph exists first, while undo() right above it has the guard. will crash if you try to redo when no graph is loaded

just copied the same if check from undo() to keep them consistent.

@avinxshKD
Copy link
Author

hey @pradeeban this is one of the issue i mentioned in #311 while refactoring the server actions. fixing this redo() won't crash when no graph is loaded,, thanks

@pradeeban pradeeban merged commit 1dc7d84 into ControlCore-Project:dev Feb 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants