Skip to content

Commit c27318f

Browse files
jacobheunvmx
authored andcommitted
fix: ensure callback is called
1 parent c1bd9cf commit c27318f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/decision-engine/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ class DecisionEngine {
9595
const groupedTasks = groupBy(tasks, (task) => task.target.toB58String())
9696

9797
waterfall([
98-
(cb) => map(uniqCids, (cid, cb) => {
98+
(callback) => map(uniqCids, (cid, cb) => {
9999
this.blockstore.get(cid, cb)
100-
}, cb),
101-
(blocks, cb) => each(values(groupedTasks), (tasks, cb) => {
100+
}, callback),
101+
(blocks, callback) => each(values(groupedTasks), (tasks, cb) => {
102102
// all tasks have the same target
103103
const peer = tasks[0].target
104104
const blockList = cids.map((cid) => {
@@ -115,7 +115,7 @@ class DecisionEngine {
115115

116116
cb()
117117
})
118-
})
118+
}, callback)
119119
], (err) => {
120120
this._tasks = []
121121

0 commit comments

Comments
 (0)