[gnome-shell] objectManager: handle object manager sending empty array



commit 9c4e875de440b1b60a6723d17daafcfceaa137f2
Author: Ray Strode <rstrode redhat com>
Date:   Wed Jun 14 16:41:41 2017 -0400

    objectManager: handle object manager sending empty array
    
    If the service implementing the object manager returns
    a 0 length array we currently throw an exception.
    
    This commit fixes that.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=780403

 js/misc/objectManager.js |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/js/misc/objectManager.js b/js/misc/objectManager.js
index 2252043..c86e47a 100644
--- a/js/misc/objectManager.js
+++ b/js/misc/objectManager.js
@@ -193,6 +193,11 @@ const ObjectManager = new Lang.Class({
 
             let [objects] = result;
 
+            if (!objects) {
+                this._tryToCompleteLoad();
+                return;
+            }
+
             let objectPaths = Object.keys(objects);
             for (let i = 0; i < objectPaths.length; i++) {
                 let objectPath = objectPaths[i];


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]