mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-02-05 03:24:17 +00:00
add check for input string emptiness in filterLang()
This commit is contained in:
parent
cfd51f163e
commit
a26ff53c76
@ -543,7 +543,9 @@ function filterLang(string) {
|
||||
var langFilterReason = '';
|
||||
var langFilterList = $.Options.filterLangList.val;
|
||||
|
||||
if (langFilterList.length > 0) {
|
||||
if (!string) {
|
||||
langFilterReason = polyglot.t('this is undefined', {'this': 'string'});
|
||||
} else if (langFilterList.length > 0) {
|
||||
var langFilterAccuracy = $.Options.filterLangAccuracy.val;
|
||||
langFilterPass = (langFilterMode === 'whitelist') ? false : true;
|
||||
langFilterReason = polyglot.t('this doesnt contain that', {'this': polyglot.t(langFilterMode), 'that': polyglot.t('language of this')});
|
||||
|
Loading…
x
Reference in New Issue
Block a user