mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 09:35:39 -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) ->
|
formatEntity: (req, document) ->
|
||||||
documentObject = super(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
|
return documentObject
|
||||||
else
|
else
|
||||||
return _.omit documentObject, @privateProperties
|
return _.omit documentObject, @privateProperties
|
||||||
|
|
Loading…
Reference in a new issue