From d27fc31ef0850e045e4fb2451e98094ed8c860c9 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 8fa305bb89..d6c634cede 100644 --- a/chrome/content/zotero/xpcom/integration.js +++ b/chrome/content/zotero/xpcom/integration.js @@ -2907,7 +2907,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