Skip to content

Commit

Permalink
fix: Clear pauseIdSet once history tracking is resumed
Browse files Browse the repository at this point in the history
  • Loading branch information
surajshetty3416 committed Dec 18, 2024
1 parent 93556ad commit a4df15c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions frontend/src/utils/useCanvasHistory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,16 +137,15 @@ export function useCanvasHistory(source: Ref<Block>, selectedBlockIds: Ref<strin

function resume(pauseId?: PauseId, commitNow?: boolean, force?: boolean) {
nextTick(() => {
// console.log("resuming...", pauseId);
if (pauseId && pauseIdSet.has(pauseId)) {
pauseIdSet.delete(pauseId);
} else if (!force) {
return;
}

if (pauseIdSet.size && !force) {
return;
}
pauseIdSet.clear();
resumeTracking();
if (commitNow) commit();
});
Expand Down

0 comments on commit a4df15c

Please sign in to comment.