From b21dbbace4165de459af981c3bc67ae6d83cd1cc Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Mon, 13 Feb 2012 13:36:18 -0500 Subject: [PATCH] Also don't break if replacing a field with a bibliography is cancelled --- chrome/content/zotero/xpcom/integration.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js index 1e5e9ee2a..23e713d02 100644 --- a/chrome/content/zotero/xpcom/integration.js +++ b/chrome/content/zotero/xpcom/integration.js @@ -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) {