-
Notifications
You must be signed in to change notification settings - Fork 342
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] utils: fix calls to batched callback from within the callback
Previously, calling the batched function from within the callback being batched would fail as it would be treated as part of the same batch. This commit fixes that by scheduling the reset of the "called" flag before calling the callback. This means that all microtasks that were already in the microtask queue when a batch is about to run are treated as part of the batch, and all microtasks that will be added by the callback are not.
- Loading branch information
1 parent
7611ea6
commit d80fad7
Showing
3 changed files
with
66 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters