Also don't break if replacing a field with a bibliography is cancelled

This commit is contained in:
Simon Kornblith 2012-02-13 13:36:18 -05:00
parent 10a09884f4
commit b21dbbace4

View file

@ -1142,7 +1142,9 @@ Zotero.Integration.Fields.prototype.addField = function(note) {
if(field) {
if(!this._doc.displayAlert(Zotero.getString("integration.replace"),
Components.interfaces.zoteroIntegrationDocument.DIALOG_ICON_STOP,
Components.interfaces.zoteroIntegrationDocument.DIALOG_BUTTONS_OK_CANCEL)) return false;
Components.interfaces.zoteroIntegrationDocument.DIALOG_BUTTONS_OK_CANCEL)) {
throw new Zotero.Integration.UserCancelledException;
}
}
if(!field) {
@ -1653,9 +1655,6 @@ Zotero.Integration.Fields.prototype.addEditCitation = function(field, callback)
} else {
newField = true;
var field = this.addField(true);
if(!field) {
throw new Zotero.Integration.UserCancelledException;
}
}
if(!citation) {