From 45c2265c1ed34f926c34bceb388679cf34134a1b Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 11 Feb 2016 15:07:15 -0500 Subject: [PATCH] Update DB query return value check in Collection::getChildItems() --- 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 index 7cf6b7aeed..7205c4211a 100644 --- 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;