From 4619949678a7dae979102cca34e28c74078f46c7 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Wed, 3 Jul 2024 10:18:49 -0400 Subject: [PATCH] Fix RemoteTranslate null ref error when translation fails --- chrome/content/zotero/RemoteTranslate.jsm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/chrome/content/zotero/RemoteTranslate.jsm b/chrome/content/zotero/RemoteTranslate.jsm index 22bc4a1da8..c018523078 100644 --- a/chrome/content/zotero/RemoteTranslate.jsm +++ b/chrome/content/zotero/RemoteTranslate.jsm @@ -172,6 +172,10 @@ class RemoteTranslate { let items = []; try { let jsonItems = await actor.sendQuery("translate", { translator: this._translator, id: this._id }); + if (jsonItems === null) { + Zotero.debug('RemoteTranslate: translate query returned null'); + return null; + } if (options.libraryID !== false) { let itemsLeftToSave = jsonItems.length; let attachmentsInProgress = new Set();