Fix lint
This commit is contained in:
parent
09e0c4f883
commit
e128171ddc
@ -39,6 +39,13 @@ export function getBestMatchingLocale(messages, defaultLocale = 'en') {
|
||||
|
||||
let bestLocale = defaultLocale;
|
||||
// Get best matching locale
|
||||
locales.some(locale => (messages[locale] && (bestLocale = locale)));
|
||||
locales.some((locale) => {
|
||||
if (messages[locale]) {
|
||||
bestLocale = locale;
|
||||
// Stop at first matching locale
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
return bestLocale;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user