make handling of failure in _loadTranslator consistent
This commit is contained in:
parent
75b354a67e
commit
8640bbf37b
1 changed files with 3 additions and 7 deletions
|
@ -936,10 +936,7 @@ Zotero.Translate.Base.prototype = {
|
|||
*/
|
||||
"_translateHaveTranslator":function() {
|
||||
// load translators
|
||||
if(!this._loadTranslator(this.translator[0])) {
|
||||
this.complete(false, new Error("Translator could not be loaded"));
|
||||
return;
|
||||
}
|
||||
if(!this._loadTranslator(this.translator[0])) return;
|
||||
|
||||
// set display options to default if they don't exist
|
||||
if(!this._displayOptions) this._displayOptions = this.translator[0].displayOptions;
|
||||
|
@ -1091,9 +1088,7 @@ Zotero.Translate.Base.prototype = {
|
|||
return;
|
||||
}
|
||||
|
||||
if(!this._loadTranslator(this._potentialTranslators[0])) {
|
||||
this.complete(false);
|
||||
}
|
||||
if(!this._loadTranslator(this._potentialTranslators[0])) return
|
||||
this._prepareDetection();
|
||||
|
||||
this.incrementAsyncProcesses();
|
||||
|
@ -1545,6 +1540,7 @@ Zotero.Translate.Import.prototype._loadTranslator = function(translator) {
|
|||
if(err) {
|
||||
Zotero.debug("Translate: Preparing IO for "+translator.label+" failed: ");
|
||||
Zotero.debug(err);
|
||||
this.complete(false, err);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue