From 4bc61273a06c0b9b5bc6163fdf905ef3815a88ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adomas=20Ven=C4=8Dkauskas?= Date: Mon, 20 Jan 2025 12:11:50 +0200 Subject: [PATCH] Fix integration session breaking when an error is thrown during getDocument() --- 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 945be019ac..6293cbe0fb 100644 --- a/chrome/content/zotero/xpcom/integration.js +++ b/chrome/content/zotero/xpcom/integration.js @@ -329,7 +329,7 @@ Zotero.Integration = new function() { if (document) { try { await document.cleanup(); - if (!Zotero.Integration.currentSession._dontActivateDocument) { + if (!Zotero.Integration.currentSession?._dontActivateDocument) { await document.activate(); }