Don't allow Zotero.Notes.add() to set sourceItemID to an attachment
This commit is contained in:
parent
0a3913d792
commit
d9b4b121b8
|
@ -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…
Reference in New Issue
Block a user