chore(core): remove deprecated intl polyfill (#8526)

This commit is contained in:
forehalo
2024-10-17 14:28:15 +00:00
parent 8d3a543a81
commit 76cfadf4e5
4 changed files with 0 additions and 22 deletions

View File

@@ -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",

View File

@@ -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();
}

View File

@@ -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,
});
});
}
}