mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
chore(core): remove deprecated intl polyfill (#8526)
This commit is contained in:
@@ -51,7 +51,6 @@
|
||||
"idb": "^8.0.0",
|
||||
"idb-keyval": "^6.2.1",
|
||||
"image-blob-reduce": "^4.1.0",
|
||||
"intl-segmenter-polyfill-rs": "^0.1.7",
|
||||
"is-svg": "^5.0.0",
|
||||
"jotai": "^2.8.0",
|
||||
"jotai-scope": "^0.7.0",
|
||||
|
||||
@@ -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