Fix deleting citations if dialog is cancelled

This commit is contained in:
Simon Kornblith 2012-07-20 13:37:03 -04:00
parent 7ebc59ee2e
commit c39a489ca9

View file

@ -1796,6 +1796,9 @@ Zotero.Integration.CitationEditInterface = function(citation, field, fieldGetter
me._fieldIndex = fieldIndex; me._fieldIndex = fieldIndex;
return me._acceptDeferred.promise; return me._acceptDeferred.promise;
}).then(function(progressCallback) { }).then(function(progressCallback) {
if(!me.citation.citationItems.length) {
throw new Zotero.Exception.UserCancelled("inserting citation");
}
me._fieldGetter.progressCallback = progressCallback; me._fieldGetter.progressCallback = progressCallback;
return me._updateSession(true); return me._updateSession(true);
}).then(function() { }).then(function() {