mirror of
https://github.com/zotero/zotero.git
synced 2026-10-07 02:58:09 +00:00
fix report of translation failure in standalone
This commit is contained in:
parent
255041556a
commit
3acdc18d88
1 changed files with 4 additions and 3 deletions
|
|
@ -664,11 +664,14 @@ Zotero.Translate.Base.prototype = {
|
|||
Zotero.debug("Translate: WARNING: Zotero.done() called after translation completion; please fix your code");
|
||||
return;
|
||||
}
|
||||
var oldState = this._currentState;
|
||||
this._currentState = null;
|
||||
this._waitForCompletion = false;
|
||||
|
||||
var errorString = null;
|
||||
if(!returnValue) errorString = this._generateErrorString(error);
|
||||
|
||||
if(this._currentState === "detect") {
|
||||
if(oldState === "detect") {
|
||||
if(this._potentialTranslators.length) {
|
||||
var lastTranslator = this._potentialTranslators.shift();
|
||||
|
||||
|
|
@ -708,8 +711,6 @@ Zotero.Translate.Base.prototype = {
|
|||
this._runHandler("done", returnValue);
|
||||
}
|
||||
|
||||
this._waitForCompletion = false;
|
||||
this._currentState = null;
|
||||
return errorString;
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue