mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
use cb for internal callbacks
This commit is contained in:
parent
3c4e74af4b
commit
347bfe4a79
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue