Commit d70e3438 authored by yann300's avatar yann300

cb(error) if any

parent ce2e8836
......@@ -43,11 +43,15 @@ module.exports = (contract, appAPI, cb) => {
}
cb()
})
}, function () {
// publish the list of sources in order, fail if any failed
async.eachSeries(sources, function (item, cb) {
swarmVerifiedPublish(item.content, item.hash, cb)
}, cb)
}, function (error) {
if (error) {
cb(error)
} else {
// publish the list of sources in order, fail if any failed
async.eachSeries(sources, function (item, cb) {
swarmVerifiedPublish(item.content, item.hash, cb)
}, cb)
}
})
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment