mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-22 18:11:32 +03:00
parent
9f3dceb220
commit
055fa0a8b4
@ -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');
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user