From bcfaadde4d6689fa9a4ff9128fc51f04351ed264 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adomas=20Ven=C4=8Dkauskas?= Date: Thu, 12 Jun 2025 14:29:50 +0300 Subject: [PATCH] Fix Citation Explorer changes not saving when switching to citation dialog --- chrome/content/zotero/xpcom/integration.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js index 19deafdfc3..92757aca74 100644 --- a/chrome/content/zotero/xpcom/integration.js +++ b/chrome/content/zotero/xpcom/integration.js @@ -2481,15 +2481,17 @@ Zotero.Integration.Session.prototype.openCitationExplorer = async function () { await Zotero.Integration.displayDialog('chrome://zotero/content/integration/citationExplorer.xhtml', 'resizable', io); if (io.openCitationDialog) { - let citations = await this.cite(io.openCitationDialog); - if (this.data.prefs.delayCitationUpdates) { - for (let citation of citations) { - await this.writeDelayedCitation(citation.field, citation); + try { + await this.cite(io.openCitationDialog); + } + catch (e) { + if (!(e instanceof Zotero.Exception.Alert)) { + Zotero.debug("An error occurred while citing from Citation Explorer. Document will be updated."); + Zotero.logError(e); } - } else { - return this.updateDocument(FORCE_CITATIONS_FALSE, false, false); } } + return this.updateDocument(FORCE_CITATIONS_FALSE, false, false); };