mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
avoid exception in LoggerSerializers
This commit is contained in:
parent
bb06b97b3c
commit
baf09e4f3a
1 changed files with 4 additions and 0 deletions
|
@ -1,5 +1,7 @@
|
|||
module.exports =
|
||||
user: (user) ->
|
||||
if !user?
|
||||
return null
|
||||
if !user._id?
|
||||
user = {_id : user}
|
||||
return {
|
||||
|
@ -10,6 +12,8 @@ module.exports =
|
|||
}
|
||||
|
||||
project: (project) ->
|
||||
if !project?
|
||||
return null
|
||||
if !project._id?
|
||||
project = {_id: project}
|
||||
return {
|
||||
|
|
Loading…
Reference in a new issue