Skip to content

Commit

Permalink
fix: order of async operations
Browse files Browse the repository at this point in the history
  • Loading branch information
mshatikhin committed Dec 12, 2024
1 parent d3c8edd commit bd91429
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/react-ui/lib/taskWithDelayAndMinimalDuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ export class TaskWithDelayAndMinimalDuration {

this.isTaskActive = false;

if (!this.timeoutBeforeTaskStart && !this.timeoutBeforeTaskStop) {
this.taskParams.taskStopCallback();
}

if (this.timeoutBeforeTaskStart) {
this.clearTimeoutBeforeTaskStart();
}

if (!this.timeoutBeforeTaskStart && !this.timeoutBeforeTaskStop) {
this.taskParams.taskStopCallback();
}
};

public clearTask = () => {
Expand Down

0 comments on commit bd91429

Please sign in to comment.