mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 04:48:53 +00:00
chore(core): remove deprecated intl polyfill (#8526)
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { polyfillDispose } from './dispose';
|
||||
import { polyfillI18n } from './intl-segmenter';
|
||||
import { polyfillPromise } from './promise-with-resolvers';
|
||||
import { polyfillEventLoop } from './request-idle-callback';
|
||||
import { polyfillResizeObserver } from './resize-observer';
|
||||
@@ -11,7 +10,6 @@ export function polyfillElectron() {
|
||||
export async function polyfillBrowser() {
|
||||
polyfillResizeObserver();
|
||||
polyfillEventLoop();
|
||||
await polyfillI18n();
|
||||
await polyfillPromise();
|
||||
await polyfillDispose();
|
||||
}
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
export async function polyfillI18n() {
|
||||
if (Intl.Segmenter === undefined) {
|
||||
await import('intl-segmenter-polyfill-rs').then(({ Segmenter }) => {
|
||||
Object.defineProperty(Intl, 'Segmenter', {
|
||||
value: Segmenter,
|
||||
configurable: true,
|
||||
writable: true,
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user