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
parent 998315dd58
commit 94650e2ee9

View file

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