silently ignore when local isn't found
This commit is contained in:
parent
3b1611ee3c
commit
def329bf67
1 changed files with 2 additions and 3 deletions
|
@ -49,10 +49,9 @@ export const getLocale = (client: Client, text: string) => {
|
||||||
const str = locale.get(text)
|
const str = locale.get(text)
|
||||||
?? client.locales.get(client.config.default_lang)?.get(text);
|
?? client.locales.get(client.config.default_lang)?.get(text);
|
||||||
|
|
||||||
if (str === undefined) {
|
if (str !== undefined) {
|
||||||
throw 'Missing locales';
|
|
||||||
}
|
|
||||||
data[lang] = str.toLowerCase();
|
data[lang] = str.toLowerCase();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
|
|
Loading…
Reference in a new issue