Skip to content

Commit

Permalink
front: fix bug calling pathfinding twice
Browse files Browse the repository at this point in the history
  • Loading branch information
anisometropie committed Nov 19, 2024
1 parent cb99790 commit 8acddb2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions front/src/modules/pathfinding/hooks/usePathfinding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@ export const usePathfinding = (
};

useEffect(() => {
if (pathfindingState.running) {
return;
}
if (isPathfindingInitialized) {
pathfindingDispatch({
type: 'VIAS_CHANGED',
Expand Down

0 comments on commit 8acddb2

Please sign in to comment.