Skip to content

Commit cfbd761

Browse files
author
Fabian Pechstein
committed
add sanity check for language checks ;)
1 parent 020ba7f commit cfbd761

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/QuickTranslateBundle/Resources/public/js/utilities/isDeeplLanguage.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
*/
99

1010
function isDeeplLanguage(lang) {
11+
if (!lang) {
12+
return false;
13+
}
1114

1215
lang = lang.split("_")[0];
1316

@@ -25,7 +28,5 @@ function isDeeplLanguage(lang) {
2528
"zh"
2629
];
2730

28-
29-
3031
return deeplLanguages.includes(lang);
3132
}

0 commit comments

Comments
 (0)