From 94650e2ee91ea81a50747b286a3157ce5d046872 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 cdd27eebcb..b88d02fec3 100644 --- a/chrome/content/zotero/xpcom/integration.js +++ b/chrome/content/zotero/xpcom/integration.js @@ -321,7 +321,7 @@ Zotero.Integration = new function() { if (document) { try { await document.cleanup(); - if (!Zotero.Integration.currentSession._dontActivateDocument) { + if (!Zotero.Integration.currentSession?._dontActivateDocument) { await document.activate(); }