mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 15:48:11 -05:00
Fixing more crashing bugs
This commit is contained in:
parent
30e08e2c99
commit
2b8006ff83
1 changed files with 1 additions and 1 deletions
|
@ -14,7 +14,7 @@ class LevelSessionHandler extends Handler
|
|||
|
||||
formatEntity: (req, document) ->
|
||||
documentObject = super(req, document)
|
||||
if req.user.isAdmin() or req.user.id is document.creator or ('employer' in (req.user.get('permissions') ? []))
|
||||
if req.user?.isAdmin() or req.user?.id is document.creator or ('employer' in (req.user?.get('permissions') ? []))
|
||||
return documentObject
|
||||
else
|
||||
return _.omit documentObject, @privateProperties
|
||||
|
|
Loading…
Reference in a new issue