Guest User

Untitled

a guest
Dec 10th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. function checkStable(zone) {
  2. if (zone._nesting == 0 && !zone.hasPendingMicrotasks && !zone.isStable) {
  3. try {
  4. zone._nesting++;
  5. zone.onMicrotaskEmpty.emit(null);
  6. }
  7. finally {
  8. zone._nesting--;
  9. if (!zone.hasPendingMicrotasks) {
  10. try {
  11. zone.runOutsideAngular(() => zone.onStable.emit(null));
  12. }
  13. finally {
  14. zone.isStable = true;
  15. }
  16. }
  17. }
  18. }
  19. }
Add Comment
Please, Sign In to add comment