From fb5a0f8fa53903b958aad31ac84a3c607fc2fef9 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Thu, 10 Feb 2011 16:04:04 -0500 Subject: [PATCH] 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 --- js/ui/search.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ui/search.js b/js/ui/search.js index d1fa925c8..ca35341e9 100644 --- a/js/ui/search.js +++ b/js/ui/search.js @@ -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;