Skip to content

Commit

Permalink
fix: ensure callback is called
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobheun authored and vmx committed Jan 7, 2019
1 parent c1bd9cf commit c27318f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/decision-engine/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ class DecisionEngine {
const groupedTasks = groupBy(tasks, (task) => task.target.toB58String())

waterfall([
(cb) => map(uniqCids, (cid, cb) => {
(callback) => map(uniqCids, (cid, cb) => {
this.blockstore.get(cid, cb)
}, cb),
(blocks, cb) => each(values(groupedTasks), (tasks, cb) => {
}, callback),
(blocks, callback) => each(values(groupedTasks), (tasks, cb) => {
// all tasks have the same target
const peer = tasks[0].target
const blockList = cids.map((cid) => {
Expand All @@ -115,7 +115,7 @@ class DecisionEngine {

cb()
})
})
}, callback)
], (err) => {
this._tasks = []

Expand Down

0 comments on commit c27318f

Please sign in to comment.