forked from akai/readest
@@ -89,6 +89,7 @@ export const isSameLang = (lang1?: string | null, lang2?: string | null): boolea
|
||||
export const isValidLang = (lang?: string) => {
|
||||
if (!lang) return false;
|
||||
if (typeof lang !== 'string') return false;
|
||||
if (['und', 'mul', 'mis', 'zxx'].includes(lang)) return false;
|
||||
const code = normalizedLangCode(lang);
|
||||
return iso6392.some((l) => l.iso6391 === code || l.iso6392B === code);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user