[gnome-shell] search: return an empty list instead of null
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] search: return an empty list instead of null
- Date: Sun, 13 Feb 2011 19:41:21 +0000 (UTC)
commit fb5a0f8fa53903b958aad31ac84a3c607fc2fef9
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu Feb 10 16:04:04 2011 -0500
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 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/search.js b/js/ui/search.js
index d1fa925..ca35341 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]