Switch to using a common runtime chunk rather than locales

This commit is contained in:
Claire
2023-06-10 17:43:13 +02:00
parent 8c26d49cbd
commit 34efd1a24c
6 changed files with 5 additions and 28 deletions

View File

@@ -1,22 +0,0 @@
let theLocale;
export function setLocale(locale) {
theLocale = locale;
}
export function getLocale() {
return theLocale;
}
export function onProviderError(error) {
// Silent the error, like upstream does
if(process.env.NODE_ENV === 'production') return;
// This browser does not advertise Intl support for this locale, we only print a warning
// As-per the spec, the browser should select the best matching locale
if(typeof error === "object" && error.message.match("MISSING_DATA")) {
console.warn(error.message);
}
console.error(error);
}