mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-29 13:53:40 -05:00
remove unnecessary call to async.series in OutputFileFinder
callback was previously async but is now synchronous, so high stack usage.
This commit is contained in:
parent
416d7a17a7
commit
59c25fc703
1 changed files with 6 additions and 14 deletions
|
@ -17,20 +17,12 @@ module.exports = OutputFileFinder =
|
||||||
jobs = []
|
jobs = []
|
||||||
outputFiles = []
|
outputFiles = []
|
||||||
for file in allFiles
|
for file in allFiles
|
||||||
do (file) ->
|
if !incomingResources[file]
|
||||||
jobs.push (callback) ->
|
outputFiles.push {
|
||||||
if incomingResources[file]
|
path: file
|
||||||
return callback()
|
type: file.match(/\.([^\.]+)$/)?[1]
|
||||||
else
|
}
|
||||||
outputFiles.push {
|
callback null, outputFiles
|
||||||
path: file
|
|
||||||
type: file.match(/\.([^\.]+)$/)?[1]
|
|
||||||
}
|
|
||||||
callback()
|
|
||||||
|
|
||||||
async.series jobs, (error) ->
|
|
||||||
return callback(error) if error?
|
|
||||||
callback null, outputFiles
|
|
||||||
|
|
||||||
_getAllFiles: (directory, _callback = (error, fileList) ->) ->
|
_getAllFiles: (directory, _callback = (error, fileList) ->) ->
|
||||||
callback = (error, fileList) ->
|
callback = (error, fileList) ->
|
||||||
|
|
Loading…
Reference in a new issue