Skip to content

Commit 055fa0a

Browse files
committed
fix(core): polyfill iterator helper for safari (#8824)
fix AF-1691
1 parent 9f3dceb commit 055fa0a

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

packages/frontend/core/src/bootstrap/polyfill/browser.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { polyfillDispose } from './dispose';
2+
import { polyfillIteratorHelpers } from './iterator-helpers';
23
import { polyfillPromise } from './promise-with-resolvers';
34
import { polyfillEventLoop } from './request-idle-callback';
45
import { polyfillResizeObserver } from './resize-observer';
@@ -7,3 +8,4 @@ polyfillResizeObserver();
78
polyfillEventLoop();
89
await polyfillPromise();
910
await polyfillDispose();
11+
await polyfillIteratorHelpers();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export async function polyfillIteratorHelpers() {
2+
if (typeof globalThis['Iterator'] !== 'function') {
3+
// @ts-expect-error ignore
4+
// https://github.com/zloirock/core-js/blob/master/packages/core-js/proposals/iterator-helpers-stage-3.js
5+
await import('core-js/proposals/iterator-helpers-stage-3');
6+
}
7+
}

0 commit comments

Comments
 (0)