Fix RemoteTranslate null ref error when translation fails
This commit is contained in:
parent
54721652b3
commit
4619949678
1 changed files with 4 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue