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.
This commit is contained in:
Adomas Venčkauskas 2017-03-07 12:34:52 +02:00
parent e9fd7f2dd1
commit 580cc32f6f

View file

@ -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");