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
This commit is contained in:
Ray Strode 2017-06-14 16:41:41 -04:00
parent 0e922eee36
commit 9c4e875de4

View File

@ -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];