Skip to content

Commit

Permalink
Clear canceled task node early (#16403)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon authored Aug 21, 2019
1 parent 0672829 commit 3ed289b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,9 @@ export function cancelCallback(callbackNode: mixed) {

export function flushSyncCallbackQueue() {
if (immediateQueueCallbackNode !== null) {
Scheduler_cancelCallback(immediateQueueCallbackNode);
const node = immediateQueueCallbackNode;
immediateQueueCallbackNode = null;
Scheduler_cancelCallback(node);
}
flushSyncCallbackQueueImpl();
}
Expand Down

0 comments on commit 3ed289b

Please sign in to comment.