Additional logging for "Item collection not found" error in toJSON()
This commit is contained in:
parent
a53f363b8d
commit
5c95d4e0ba
1 changed files with 1 additions and 1 deletions
|
@ -4506,7 +4506,7 @@ Zotero.Item.prototype.toJSON = function (options = {}) {
|
||||||
obj.collections = this.getCollections().map(function (id) {
|
obj.collections = this.getCollections().map(function (id) {
|
||||||
var { libraryID, key } = this.ContainerObjectsClass.getLibraryAndKeyFromID(id);
|
var { libraryID, key } = this.ContainerObjectsClass.getLibraryAndKeyFromID(id);
|
||||||
if (!key) {
|
if (!key) {
|
||||||
throw new Error("Item collection " + id + " not found");
|
throw new Error("Collection " + id + " not found for item " + this.libraryKey);
|
||||||
}
|
}
|
||||||
return key;
|
return key;
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
|
Loading…
Add table
Reference in a new issue