From be58196730379ecfa6e971a27712711b7c722042 Mon Sep 17 00:00:00 2001 From: Mikhail Shatikhin Date: Thu, 12 Dec 2024 16:44:35 +0500 Subject: [PATCH] fix: order of async operations --- packages/react-ui/lib/taskWithDelayAndMinimalDuration.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/react-ui/lib/taskWithDelayAndMinimalDuration.ts b/packages/react-ui/lib/taskWithDelayAndMinimalDuration.ts index be6b5990488..aaa4226977c 100644 --- a/packages/react-ui/lib/taskWithDelayAndMinimalDuration.ts +++ b/packages/react-ui/lib/taskWithDelayAndMinimalDuration.ts @@ -49,6 +49,10 @@ export class TaskWithDelayAndMinimalDuration { this.isTaskActive = true; + if (this.timeoutBeforeTaskStop) { + return; + } + if (this.timeoutBeforeTaskStart) { this.clearTimeoutBeforeTaskStart(); }