Don't allow note on embedded-image attachments
https://github.com/windingwind/zotero-better-notes/issues/212
This commit is contained in:
parent
89bc094690
commit
deb17d450e
1 changed files with 4 additions and 0 deletions
|
@ -2240,6 +2240,10 @@ Zotero.Item.prototype.setNote = function(text) {
|
||||||
throw ("updateNote() can only be called on notes and attachments");
|
throw ("updateNote() can only be called on notes and attachments");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.isEmbeddedImageAttachment()) {
|
||||||
|
throw new Error("setNote() cannot be called on embedded-image attachments")
|
||||||
|
}
|
||||||
|
|
||||||
if (typeof text != 'string') {
|
if (typeof text != 'string') {
|
||||||
throw ("text must be a string in Zotero.Item.setNote() (was " + typeof text + ")");
|
throw ("text must be a string in Zotero.Item.setNote() (was " + typeof text + ")");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue