mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
broken a err and null check into 2 lines
This commit is contained in:
parent
67f4929e49
commit
4eed88c1ab
1 changed files with 4 additions and 1 deletions
|
@ -92,7 +92,10 @@ module.exports =
|
||||||
|
|
||||||
|
|
||||||
Project.getProject project_or_id, "", (err, project)->
|
Project.getProject project_or_id, "", (err, project)->
|
||||||
if err? or !project?
|
if err?
|
||||||
|
logger.err err:err, project_or_id:project_or_id, "error getting project for finding element"
|
||||||
|
return callback(err)
|
||||||
|
if !project?
|
||||||
return callback("project could not be found for finding a element #{project_or_id}")
|
return callback("project could not be found for finding a element #{project_or_id}")
|
||||||
if needlePath == '' || needlePath == '/'
|
if needlePath == '' || needlePath == '/'
|
||||||
return callback(null, project.rootFolder[0])
|
return callback(null, project.rootFolder[0])
|
||||||
|
|
Loading…
Reference in a new issue