Skip to content

Commit

Permalink
Use callback instead of promise
Browse files Browse the repository at this point in the history
  • Loading branch information
rbayliss committed Nov 7, 2019
1 parent d549044 commit 83b1d3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ function addWatchTask(taker, name, description) {
return task.hasOwnProperty('_watch') && task._watch;
});
// Define the watch function.
let watch = () => {
let watch = (cb) => {
for (let watchableName of watchables) {
const watchableTask = taker.task(watchableName);
taker.watch(watchableTask.unwrap()._watch, watchableTask);
}
return Promise.resolve();
cb();
};
// Push an initial run of each watchable task onto the beginning.
if (watchables.length > 0) {
Expand Down

0 comments on commit 83b1d3f

Please sign in to comment.