Skip to content

Commit

Permalink
fix: only polyfill queueMicrotask if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanWalker committed Jan 2, 2025
1 parent d69e5fa commit b9cd642
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/angular/polyfills/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@ const polyfilledPerformance = getPerformanceObject();
for (const key in polyfilledPerformance) {
global.performance[key] ??= polyfilledPerformance[key];
}

if (typeof queueMicrotask === 'undefined') {
global.queueMicrotask = (cb) => Promise.resolve().then(cb);
}

0 comments on commit b9cd642

Please sign in to comment.