We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1866900 commit df73502Copy full SHA for df73502
packages/node_modules/pouchdb-abstract-mapreduce/src/taskqueue.js
@@ -3,18 +3,16 @@
3
* callbacks will eventually fire (once).
4
*/
5
6
-
7
class TaskQueue {
8
constructor() {
9
- this.promise = new Promise(function (fulfill) {fulfill(); });
+ this.promise = Promise.resolve();
10
}
11
12
add(promiseFactory) {
13
- this.promise = this.promise.catch(function () {
+ this.promise = this.promise
14
// just recover
15
- }).then(function () {
16
- return promiseFactory();
17
- });
+ .catch(() => { })
+ .then(() => promiseFactory());
18
return this.promise;
19
20
0 commit comments