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:
Jasper St. Pierre 2011-02-10 16:04:04 -05:00
parent 83883fafbb
commit fb5a0f8fa5

View File

@ -355,7 +355,7 @@ SearchSystem.prototype = {
updateSearch: function(searchString) {
searchString = searchString.replace(/^\s+/g, '').replace(/\s+$/g, '');
if (searchString == '')
return null;
return [];
let terms = searchString.split(/\s+/);
let isSubSearch = terms.length == this._previousTerms.length;