mirror of https://github.com/zulip/zulip.git
narrow: Fix incorrect method of querying for operands.
Commit 02413f9a1b
introduced a bug
where any code reaching `if(operators('search')` would be executed,
which caused inputs where we didn't have the search operator to
throw an error when we do not find a search operan later.
At least one affected cases was narrowing to an empty topic.
This commit is contained in:
parent
a1cf77ca54
commit
d6f5655d0d
|
@ -858,7 +858,7 @@ function pick_empty_narrow_banner() {
|
|||
}
|
||||
|
||||
// For empty stream searches within other narrows, we display the stop words
|
||||
if (current_filter.operators("search")) {
|
||||
if (current_filter.operands("search").length > 0) {
|
||||
show_search_query();
|
||||
return $("#empty_search_narrow_message");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue