commit 45c2265c1ed34f926c34bceb388679cf34134a1b parent 4d85866ade1780c4b472602e11957947b1cd3902 Author: Dan Stillman <dstillman@zotero.org> Date: Thu, 11 Feb 2016 15:07:15 -0500 Update DB query return value check in Collection::getChildItems() Diffstat:
| M | chrome/content/zotero/xpcom/data/collection.js | | | 5 | ++--- |
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/chrome/content/zotero/xpcom/data/collection.js b/chrome/content/zotero/xpcom/data/collection.js @@ -210,8 +210,7 @@ Zotero.Collection.prototype.getChildCollections = function (asIDs) { * * @param {Boolean} asIDs Return as itemIDs * @param {Boolean} includeDeleted Include items in Trash - * @return {Zotero.Item[]|Integer[]} - Array of Zotero.Item instances or itemIDs, - * or FALSE if none + * @return {Zotero.Item[]|Integer[]} - Array of Zotero.Item instances or itemIDs */ Zotero.Collection.prototype.getChildItems = function (asIDs, includeDeleted) { this._requireData('childItems'); @@ -923,7 +922,7 @@ Zotero.Collection.prototype.loadChildItems = Zotero.Promise.coroutine(function* this._childItems = []; - if (ids) { + if (ids.length) { var items = yield this.ChildObjects.getAsync(ids); if (items) { this._childItems = items;