Throw async error from _loadTranslator()
This commit is contained in:
parent
3bc08ba10c
commit
6450d39933
|
@ -1342,11 +1342,15 @@ Zotero.Translate.Base.prototype = {
|
||||||
Zotero.Promise.resolve(this.translator[0])
|
Zotero.Promise.resolve(this.translator[0])
|
||||||
.then(function (translator) {
|
.then(function (translator) {
|
||||||
this.translator[0] = translator;
|
this.translator[0] = translator;
|
||||||
this._loadTranslator(translator).then(() => this._translateTranslatorLoaded());
|
this._loadTranslator(translator)
|
||||||
|
.then(() => this._translateTranslatorLoaded())
|
||||||
|
.catch(e => deferred.reject(e));
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this._loadTranslator(this.translator[0]).then(() => this._translateTranslatorLoaded());
|
this._loadTranslator(this.translator[0])
|
||||||
|
.then(() => this._translateTranslatorLoaded())
|
||||||
|
.catch(e => deferred.reject(e));
|
||||||
}
|
}
|
||||||
|
|
||||||
return deferred.promise;
|
return deferred.promise;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user