mirror of
https://github.com/wukko/cobalt.git
synced 2025-06-13 05:37:44 +02:00
utils/verifyLanguageCode: fix variable names
This commit is contained in:
@ -27,9 +27,9 @@ export function cleanString(string) {
|
||||
return string;
|
||||
}
|
||||
export function verifyLanguageCode(code) {
|
||||
const code = String(code.slice(0, 2).toLowerCase());
|
||||
const langCode = String(code.slice(0, 2).toLowerCase());
|
||||
if (RegExp(/[a-z]{2}/).test(code)) {
|
||||
return code
|
||||
return langCode
|
||||
}
|
||||
return "en"
|
||||
}
|
||||
|
Reference in New Issue
Block a user