mirror of
https://github.com/zotero/zotero.git
synced 2026-10-08 03:08:19 +00:00
Don't allow Zotero.Notes.add() to set sourceItemID to an attachment
This commit is contained in:
parent
0a3913d792
commit
d9b4b121b8
1 changed files with 2 additions and 2 deletions
|
|
@ -2573,9 +2573,9 @@ Zotero.Notes = new function(){
|
|||
Zotero.DB.commitTransaction();
|
||||
throw ("Cannot set note source to invalid item " + sourceItemID);
|
||||
}
|
||||
if (sourceItem.isNote()){
|
||||
if (!sourceItem.isRegularItem()){
|
||||
Zotero.DB.commitTransaction();
|
||||
throw ("Cannot set note source to another note (" + sourceItemID + ")");
|
||||
throw ("Cannot set note source to a note or attachment (" + sourceItemID + ")");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue