silently ignore when local isn't found

This commit is contained in:
Mylloon 2022-07-21 23:01:54 +02:00
parent 3b1611ee3c
commit def329bf67
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -49,10 +49,9 @@ export const getLocale = (client: Client, text: string) => {
const str = locale.get(text)
?? client.locales.get(client.config.default_lang)?.get(text);
if (str === undefined) {
throw 'Missing locales';
if (str !== undefined) {
data[lang] = str.toLowerCase();
}
data[lang] = str.toLowerCase();
});
return data;