search: return an empty list instead of null
Make SearchSystem.updateSearch be consistent and always return a list, avoiding an exception in SearchResults.updateSearch. https://bugzilla.gnome.org/show_bug.cgi?id=642208
This commit is contained in:
parent
83883fafbb
commit
fb5a0f8fa5
@ -355,7 +355,7 @@ SearchSystem.prototype = {
|
|||||||
updateSearch: function(searchString) {
|
updateSearch: function(searchString) {
|
||||||
searchString = searchString.replace(/^\s+/g, '').replace(/\s+$/g, '');
|
searchString = searchString.replace(/^\s+/g, '').replace(/\s+$/g, '');
|
||||||
if (searchString == '')
|
if (searchString == '')
|
||||||
return null;
|
return [];
|
||||||
|
|
||||||
let terms = searchString.split(/\s+/);
|
let terms = searchString.split(/\s+/);
|
||||||
let isSubSearch = terms.length == this._previousTerms.length;
|
let isSubSearch = terms.length == this._previousTerms.length;
|
||||||
|
Loading…
Reference in New Issue
Block a user