Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #617 - $loaded() triggered too soon
Because of promisifying the $$added method, the child_added events were actually being processed internally after the loaded trigger. This occurred because $q.when() actually uses nextTick() internally as well, meaning the child_added events occurred immediately, but then $$process was not called until the second tick occurred; a difficult use case to catch. The $loaded() event, meanwhile, had already triggered on the first tick. Solution was to promisify all the events and then remove the batch() wrapper since they trigger on nextTick() anyway now. So all events are back to firing in order on the next tick.
- Loading branch information
Showing
3 changed files
with
40 additions
and
26 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