mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-07-11 15:22:55 +02:00
Merge pull request #565 from eitchtee/dev
fix(air-datepicker): unwrap locale modules so it doesn't default to russian
This commit is contained in:
@@ -87,11 +87,12 @@ export const getLocale = async (langCode) => {
|
|||||||
const locale = allLocales[langCode];
|
const locale = allLocales[langCode];
|
||||||
|
|
||||||
if (locale) {
|
if (locale) {
|
||||||
return locale;
|
return locale.default ?? locale;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.warn(`Could not find locale for '${langCode}'. Defaulting to English.`);
|
console.warn(`Could not find locale for '${langCode}'. Defaulting to English.`);
|
||||||
return allLocales['en']; // Default to English
|
const fallbackLocale = allLocales['en'];
|
||||||
|
return fallbackLocale.default ?? fallbackLocale;
|
||||||
};
|
};
|
||||||
|
|
||||||
function isMobileDevice() {
|
function isMobileDevice() {
|
||||||
|
|||||||
Reference in New Issue
Block a user