mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-03-13 05:51:03 +00:00
fix checks for twist .msg fields corectness in search results handling
This commit is contained in:
parent
2a37be1a73
commit
6eec8088cf
@ -439,13 +439,17 @@ function processQuery(req) {
|
||||
if (!_queryProcessedMap[req.id][key]) {
|
||||
_queryProcessedMap[req.id][key] = true;
|
||||
|
||||
if ((typeof userpost.msg !== 'string' || userpost.msg === '')
|
||||
&& (typeof userpost.rt !== 'object'
|
||||
|| typeof userpost.rt.msg !== 'string' || userpost.rt.msg === ''))
|
||||
continue;
|
||||
|
||||
if ($.Options.filterLang.val !== 'disable' && $.Options.filterLangForSearching.val) {
|
||||
if (typeof userpost.rt !== 'undefined') {
|
||||
var msg = userpost.rt.msg;
|
||||
} else {
|
||||
var msg = userpost.msg;
|
||||
}
|
||||
langFilterData = filterLang(msg);
|
||||
if (userpost.msg !== '')
|
||||
langFilterData = filterLang(userpost.msg);
|
||||
else
|
||||
langFilterData = filterLang(userpost.rt.msg);
|
||||
|
||||
if ($.Options.filterLangSimulate.val) {
|
||||
req.posts[i].langFilter = langFilterData;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user