mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Account for error being null
This commit is contained in:
parent
2c62acee0b
commit
cc81eca902
1 changed files with 1 additions and 1 deletions
|
@ -96,7 +96,7 @@ module.exports = EditorHttpController =
|
||||||
EditorController.addFolder project_id, parent_folder_id, name, "editor", (error, doc) ->
|
EditorController.addFolder project_id, parent_folder_id, name, "editor", (error, doc) ->
|
||||||
if error == "project_has_to_many_files"
|
if error == "project_has_to_many_files"
|
||||||
res.status(400).json(req.i18n.translate("project_has_to_many_files"))
|
res.status(400).json(req.i18n.translate("project_has_to_many_files"))
|
||||||
else if error.message == 'invalid element name'
|
else if error?.message == 'invalid element name'
|
||||||
res.status(400).json(req.i18n.translate('invalid_file_name'))
|
res.status(400).json(req.i18n.translate('invalid_file_name'))
|
||||||
else if error?
|
else if error?
|
||||||
res.status(500).json(req.i18n.translate('generic_something_went_wrong'))
|
res.status(500).json(req.i18n.translate('generic_something_went_wrong'))
|
||||||
|
|
Loading…
Reference in a new issue