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:
parent
e9fd7f2dd1
commit
580cc32f6f
1 changed files with 1 additions and 1 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue