[gnome-shell] search: remove redundant check
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] search: remove redundant check
- Date: Wed, 7 Jan 2015 23:26:52 +0000 (UTC)
commit 8345fe006e397492acb21df36be923a1538b6b57
Author: Cosimo Cecchi <cosimo endlesm com>
Date: Wed Jan 7 18:16:04 2015 +0800
search: remove redundant check
We check for (metasNeeded.length == 0) at the beginning of the function,
which is only ever called when when a non-zero number of results is
received back from the provider. Effectively, this means that
(metas.length != metasNeeded.length) will also catch (metas.length == 0)
and print a nicer message to the log.
js/ui/search.js | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/search.js b/js/ui/search.js
index 4737c82..7e7cb83 100644
--- a/js/ui/search.js
+++ b/js/ui/search.js
@@ -199,10 +199,6 @@ const SearchResultsBase = new Lang.Class({
this._cancellable.reset();
this.provider.getResultMetas(metasNeeded, Lang.bind(this, function(metas) {
- if (metas.length == 0) {
- callback(false);
- return;
- }
if (metas.length != metasNeeded.length) {
log('Wrong number of result metas returned by search provider ' + this.provider.id +
': expected ' + metasNeeded.length + ' but got ' + metas.length);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]