mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-27 10:52:40 +08:00
@@ -1,4 +1,5 @@
|
|||||||
import { polyfillDispose } from './dispose';
|
import { polyfillDispose } from './dispose';
|
||||||
|
import { polyfillIteratorHelpers } from './iterator-helpers';
|
||||||
import { polyfillPromise } from './promise-with-resolvers';
|
import { polyfillPromise } from './promise-with-resolvers';
|
||||||
import { polyfillEventLoop } from './request-idle-callback';
|
import { polyfillEventLoop } from './request-idle-callback';
|
||||||
import { polyfillResizeObserver } from './resize-observer';
|
import { polyfillResizeObserver } from './resize-observer';
|
||||||
@@ -7,3 +8,4 @@ polyfillResizeObserver();
|
|||||||
polyfillEventLoop();
|
polyfillEventLoop();
|
||||||
await polyfillPromise();
|
await polyfillPromise();
|
||||||
await polyfillDispose();
|
await polyfillDispose();
|
||||||
|
await polyfillIteratorHelpers();
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
export async function polyfillIteratorHelpers() {
|
||||||
|
if (typeof globalThis['Iterator'] !== 'function') {
|
||||||
|
// @ts-expect-error ignore
|
||||||
|
// https://github.com/zloirock/core-js/blob/master/packages/core-js/proposals/iterator-helpers-stage-3.js
|
||||||
|
await import('core-js/proposals/iterator-helpers-stage-3');
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user