Fix Item.fromJSON()
failure after deb17d450e
This commit is contained in:
parent
deb17d450e
commit
1106685f2d
1 changed files with 2 additions and 2 deletions
|
@ -2241,7 +2241,7 @@ Zotero.Item.prototype.setNote = function(text) {
|
|||
}
|
||||
|
||||
if (this.isEmbeddedImageAttachment()) {
|
||||
throw new Error("setNote() cannot be called on embedded-image attachments")
|
||||
throw new Error("setNote() cannot be called on embedded-image attachments");
|
||||
}
|
||||
|
||||
if (typeof text != 'string') {
|
||||
|
@ -5227,7 +5227,7 @@ Zotero.Item.prototype.fromJSON = function (json, options = {}) {
|
|||
let parentKey = json.parentItem;
|
||||
this.parentKey = parentKey ? parentKey : false;
|
||||
|
||||
if (!this.isAnnotation()) {
|
||||
if (!this.isAnnotation() && !this.isEmbeddedImageAttachment()) {
|
||||
let note = json.note;
|
||||
this.setNote(note !== undefined ? note : "");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue