commit 6450d39933e99f7207888d1734a3a30b27873e22 parent 3bc08ba10cd67f5e7c71a3a89d8b951dac124f47 Author: Dan Stillman <dstillman@zotero.org> Date: Thu, 19 Apr 2018 02:43:32 -0400 Throw async error from _loadTranslator() Diffstat:
| M | chrome/content/zotero/xpcom/translation/translate.js | | | 8 | ++++++-- |
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js @@ -1342,11 +1342,15 @@ Zotero.Translate.Base.prototype = { Zotero.Promise.resolve(this.translator[0]) .then(function (translator) { this.translator[0] = translator; - this._loadTranslator(translator).then(() => this._translateTranslatorLoaded()); + this._loadTranslator(translator) + .then(() => this._translateTranslatorLoaded()) + .catch(e => deferred.reject(e)); }.bind(this)); } 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;