Fix deleting citations if dialog is cancelled
This commit is contained in:
parent
7ebc59ee2e
commit
c39a489ca9
1 changed files with 3 additions and 0 deletions
|
@ -1796,6 +1796,9 @@ Zotero.Integration.CitationEditInterface = function(citation, field, fieldGetter
|
|||
me._fieldIndex = fieldIndex;
|
||||
return me._acceptDeferred.promise;
|
||||
}).then(function(progressCallback) {
|
||||
if(!me.citation.citationItems.length) {
|
||||
throw new Zotero.Exception.UserCancelled("inserting citation");
|
||||
}
|
||||
me._fieldGetter.progressCallback = progressCallback;
|
||||
return me._updateSession(true);
|
||||
}).then(function() {
|
||||
|
|
Loading…
Reference in a new issue