Skip to content

Commit b9cd642

Browse files
committed
fix: only polyfill queueMicrotask if needed
1 parent d69e5fa commit b9cd642

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/angular/polyfills/src/index.ts

+4
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,7 @@ const polyfilledPerformance = getPerformanceObject();
3030
for (const key in polyfilledPerformance) {
3131
global.performance[key] ??= polyfilledPerformance[key];
3232
}
33+
34+
if (typeof queueMicrotask === 'undefined') {
35+
global.queueMicrotask = (cb) => Promise.resolve().then(cb);
36+
}

0 commit comments

Comments
 (0)