mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-05 23:29:00 +02:00
broken a err and null check into 2 lines
This commit is contained in:
@@ -92,7 +92,10 @@ module.exports =
|
||||
|
||||
|
||||
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}")
|
||||
if needlePath == '' || needlePath == '/'
|
||||
return callback(null, project.rootFolder[0])
|
||||
|
||||
Reference in New Issue
Block a user