Fixes #95, Notes.add() fails when sourceitem is null
This commit is contained in:
parent
9a7d619122
commit
2dece39ad3
1 changed files with 4 additions and 2 deletions
|
@ -1192,9 +1192,11 @@ Scholar.Notes = new function(){
|
|||
Scholar.DB.query(sql, bindParams);
|
||||
Scholar.DB.commitTransaction();
|
||||
|
||||
sourceItem.incrementNoteCount();
|
||||
if (sourceItemID){
|
||||
sourceItem.incrementNoteCount();
|
||||
Scholar.Notifier.trigger('modify', 'item', sourceItemID);
|
||||
}
|
||||
|
||||
Scholar.Notifier.trigger('modify', 'item', sourceItemID);
|
||||
Scholar.Notifier.trigger('add', 'item', note.getID());
|
||||
|
||||
return note.getID();
|
||||
|
|
Loading…
Add table
Reference in a new issue