From 58e525de6103907ddd6fd1a40a7ebdb6550cf3be Mon Sep 17 00:00:00 2001 From: wukko Date: Wed, 15 May 2024 22:50:58 +0600 Subject: [PATCH] utils: fix variable name shadowing --- src/modules/sub/utils.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/sub/utils.js b/src/modules/sub/utils.js index 0db85649..c0c373b7 100644 --- a/src/modules/sub/utils.js +++ b/src/modules/sub/utils.js @@ -27,9 +27,9 @@ export function cleanString(string) { return string; } export function verifyLanguageCode(code) { - const languageCode = String(code.slice(0, 2).toLowerCase()); - if (RegExp(/[a-z]{2}/).test(languageCode)) { - return languageCode + const code = String(code.slice(0, 2).toLowerCase()); + if (RegExp(/[a-z]{2}/).test(code)) { + return code } return "en" }