www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 2c014a9af1160d4a192eb89a24466009225a3edf
parent da7da74986c8cd327315070e5d4f72fea0534f4f
Author: Dan Stillman <dstillman@zotero.org>
Date:   Mon, 31 Oct 2016 02:28:02 -0400

Debugging for https://forums.zotero.org/discussion/62942/

Diffstat:
Mchrome/content/zotero/xpcom/data/item.js | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js @@ -4231,7 +4231,11 @@ Zotero.Item.prototype.toJSON = function (options = {}) { // Collections if (this.isTopLevelItem()) { obj.collections = this.getCollections().map(function (id) { - return this.ContainerObjectsClass.getLibraryAndKeyFromID(id).key; + var { libraryID, key } = this.ContainerObjectsClass.getLibraryAndKeyFromID(id); + if (!key) { + throw new Error("Item collection " + id + " not found"); + } + return key; }.bind(this)); }