use cb for internal callbacks

This commit is contained in:
Henry Oswald 2016-03-10 12:43:36 +00:00
parent 3c4e74af4b
commit 347bfe4a79

View file

@ -17,7 +17,7 @@ module.exports = ProjectDuplicator =
projectEntityHandler.setRootDoc newProject._id, doc_id
jobs = originalFolder.docs.map (doc)->
return (callback)->
return (cb)->
content = docContents[doc._id.toString()]
projectEntityHandler.addDocWithProject newProject, desFolder._id, doc.name, content.lines, (err, newDoc)->
if err?
@ -25,7 +25,7 @@ module.exports = ProjectDuplicator =
return callback(err)
if originalRootDoc? and newDoc.name == originalRootDoc.name
setRootDoc newDoc._id
callback()
cb()
async.series jobs, callback