From c27318f227eb252b553be30c1e421f94b4b92ae9 Mon Sep 17 00:00:00 2001 From: Jacob Heun Date: Thu, 20 Dec 2018 07:54:41 -0800 Subject: [PATCH] fix: ensure callback is called --- src/decision-engine/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/decision-engine/index.js b/src/decision-engine/index.js index e3e85149..ef8514a0 100644 --- a/src/decision-engine/index.js +++ b/src/decision-engine/index.js @@ -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) => { @@ -115,7 +115,7 @@ class DecisionEngine { cb() }) - }) + }, callback) ], (err) => { this._tasks = []