From c12e5659ab2416dbdb8c4cf5f88f2a23127f5caa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adomas=20Ven=C4=8Dkauskas?= Date: Wed, 14 Dec 2022 16:20:44 +0200 Subject: [PATCH] Fix a potential bug in integration plugin when field codes are corrupt --- chrome/content/zotero/xpcom/integration.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js index dcdd7a3785..d453ca0ecd 100644 --- a/chrome/content/zotero/xpcom/integration.js +++ b/chrome/content/zotero/xpcom/integration.js @@ -2931,7 +2931,7 @@ Zotero.Integration.CitationField = class extends Zotero.Integration.Field { Zotero.Integration.currentDoc.activate(); var result = await Zotero.Integration.currentSession.displayAlert(msg, DIALOG_ICON_CAUTION, DIALOG_BUTTONS_YES_NO_CANCEL); if (result == 0) { // Cancel - return new Zotero.Exception.UserCancelled("corrupt citation resolution"); + throw new Zotero.Exception.UserCancelled("corrupt citation resolution"); } else if (result == 1) { // No return false; } else { // Yes