There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
TypeScript appcrdteditorelectronknowledge-basemarkdownmironotesnotionnotion-alternativerustrust-langrust-languagetabletableviewwhiteboardwikiworkspace
fix(core): polyfill iterator helper for safari (#8824)
forehalo055fa0a8b4e1
diff --git a/packages/frontend/core/src/bootstrap/polyfill/browser.ts b/packages/frontend/core/src/bootstrap/polyfill/browser.tsindex b84ee578d0..f92ff94f24 100644--- a/packages/frontend/core/src/bootstrap/polyfill/browser.ts+++ b/packages/frontend/core/src/bootstrap/polyfill/browser.ts@@ -1,4 +1,5 @@import { polyfillDispose } from './dispose';+import { polyfillIteratorHelpers } from './iterator-helpers';import { polyfillPromise } from './promise-with-resolvers';import { polyfillEventLoop } from './request-idle-callback';import { polyfillResizeObserver } from './resize-observer';@@ -7,3 +8,4 @@ polyfillResizeObserver();polyfillEventLoop();await polyfillPromise();await polyfillDispose();+await polyfillIteratorHelpers();diff --git a/packages/frontend/core/src/bootstrap/polyfill/iterator-helpers.ts b/packages/frontend/core/src/bootstrap/polyfill/iterator-helpers.tsnew file mode 100644index 0000000000..59ccde6c41--- /dev/null+++ b/packages/frontend/core/src/bootstrap/polyfill/iterator-helpers.ts@@ -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');+ }+}