utils: fix variable name shadowing
This commit is contained in:
parent
b4364c4921
commit
58e525de61
@ -27,9 +27,9 @@ export function cleanString(string) {
|
|||||||
return string;
|
return string;
|
||||||
}
|
}
|
||||||
export function verifyLanguageCode(code) {
|
export function verifyLanguageCode(code) {
|
||||||
const languageCode = String(code.slice(0, 2).toLowerCase());
|
const code = String(code.slice(0, 2).toLowerCase());
|
||||||
if (RegExp(/[a-z]{2}/).test(languageCode)) {
|
if (RegExp(/[a-z]{2}/).test(code)) {
|
||||||
return languageCode
|
return code
|
||||||
}
|
}
|
||||||
return "en"
|
return "en"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user