[extensions-web: 29/30] js: Fix the "Installed Extensions" list in the case of a no-name extension
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web: 29/30] js: Fix the "Installed Extensions" list in the case of a no-name extension
- Date: Thu, 26 Jan 2012 10:42:57 +0000 (UTC)
commit b8c752714bcf845b17b8c202100dfbf4c7d2cf05
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu Jan 26 05:37:56 2012 -0500
js: Fix the "Installed Extensions" list in the case of a no-name extension
Extensions without a name can happen in the case of the fake meta object
installed by the Shell during installation so that the Shell can be
queried directly for a DOWNLOADING extension.
sweettooth/static/js/extensions.js | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/sweettooth/static/js/extensions.js b/sweettooth/static/js/extensions.js
index dc41570..bf578c4 100644
--- a/sweettooth/static/js/extensions.js
+++ b/sweettooth/static/js/extensions.js
@@ -186,6 +186,12 @@ function($, messages, dbusProxy, extensionUtils) {
}
extensionValues.sort(function(a, b) {
+ if (a.name === undefined)
+ return 0;
+
+ if (b.name === undefined)
+ return 0;
+
return a.name.localeCompare(b.name);
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]