Fix integration session breaking when an error is thrown during getDocument()

This commit is contained in:
Adomas Venčkauskas 2025-01-20 12:11:50 +02:00 • committed by Dan Stillman
parent 59b3268d01
commit 4bc61273a0

View file

@ -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();
}