Fix integration error handling code when citeproc-rs disabled.

Closes #2508
This commit is contained in:
Adomas Venčkauskas 2022-04-08 10:41:27 +03:00
parent bdbde99fa7
commit b850d16c89

View file

@ -371,11 +371,14 @@ Zotero.Integration = new function() {
Zotero.launchURL(supportURL);
}
// If the driver panicked we cannot reuse it
if (e instanceof Zotero.CiteprocRs.CiteprocRsDriverError) {
session.style.free(true);
delete Zotero.Integration.sessions[session.id];
}
// CiteprocRsDriverError available only if citeproc-rs is enabled
try {
// If the driver panicked we cannot reuse it
if (e instanceof Zotero.CiteprocRs.CiteprocRsDriverError) {
session.style.free(true);
delete Zotero.Integration.sessions[session.id];
}
} catch (e) {}
}
finally {
Zotero.logError(e);