1
0
Fork 0

Instead of return false, return the default locale arg

This commit is contained in:
Lim Chee Aun 2023-08-14 18:03:05 +08:00
parent a382efee5b
commit ac8a4c7fbf

View file

@ -6,7 +6,8 @@ function _localeMatch(...args) {
try {
return match(...args);
} catch (e) {
return false;
const defaultLocale = args[2];
return defaultLocale || false;
}
}
const localeMatch = mem(_localeMatch, {