www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 580cc32f6fd4d5d54e16de534fff4f1392ff7c7f
parent e9fd7f2dd159409f39cc8fb6765c83f9dfb3cb5e
Author: Adomas VenĨkauskas <adomas.ven@gmail.com>
Date:   Tue,  7 Mar 2017 12:34:52 +0200

Remove Promise.prototype.finally calls from translate.js not in ES6

We could monkey-patch a finally function in connectors as described in
this gist https://gist.github.com/jish/e9bcd75e391a2b21206b , but it
appears to silence propogation of unhandled rejections
and it could later come back to bite us in the butt.
Native and proper support for finally is, however, planned in ES7.

Diffstat:
Mchrome/content/zotero/xpcom/translation/translate.js | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js @@ -1542,7 +1542,7 @@ Zotero.Translate.Base.prototype = { this._waitingForSave = true; this._saveItems(this.saveQueue) .catch(e => this._runHandler("error", e)) - .finally(() => this.saveQueue = []); + .then(() => this.saveQueue = []); return; } this._debug("Translation successful");