Debugging for https://forums.zotero.org/discussion/62942/
This commit is contained in:
parent
da7da74986
commit
2c014a9af1
1 changed files with 5 additions and 1 deletions
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue