This repository was archived by the owner on Mar 17, 2025. It is now read-only.
Commit 01cea9c
committed
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.1 parent 58d32d8 commit 01cea9c
File tree
3 files changed
+40
-26
lines changed- src
- tests/unit
3 files changed
+40
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
630 | 630 | | |
631 | 631 | | |
632 | 632 | | |
633 | | - | |
| 633 | + | |
634 | 634 | | |
635 | | - | |
636 | | - | |
637 | | - | |
638 | | - | |
639 | | - | |
640 | | - | |
641 | | - | |
642 | | - | |
643 | | - | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
644 | 640 | | |
645 | 641 | | |
646 | | - | |
647 | | - | |
| 642 | + | |
| 643 | + | |
648 | 644 | | |
649 | | - | |
| 645 | + | |
650 | 646 | | |
651 | | - | |
652 | | - | |
| 647 | + | |
| 648 | + | |
653 | 649 | | |
654 | 650 | | |
655 | | - | |
656 | | - | |
| 651 | + | |
| 652 | + | |
657 | 653 | | |
658 | | - | |
| 654 | + | |
659 | 655 | | |
660 | | - | |
661 | | - | |
| 656 | + | |
| 657 | + | |
662 | 658 | | |
663 | 659 | | |
664 | | - | |
665 | | - | |
| 660 | + | |
| 661 | + | |
666 | 662 | | |
667 | | - | |
| 663 | + | |
668 | 664 | | |
669 | | - | |
| 665 | + | |
670 | 666 | | |
671 | 667 | | |
672 | 668 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
185 | 195 | | |
186 | 196 | | |
187 | 197 | | |
| |||
210 | 220 | | |
211 | 221 | | |
212 | 222 | | |
213 | | - | |
| 223 | + | |
214 | 224 | | |
215 | 225 | | |
216 | 226 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
417 | 417 | | |
418 | 418 | | |
419 | 419 | | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
420 | 428 | | |
421 | 429 | | |
422 | 430 | | |
| |||
0 commit comments