mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-29 20:02:11 +00:00
null check the user correctly
This commit is contained in:
parent
86a38df6e0
commit
35f31d5a3c
1 changed files with 2 additions and 2 deletions
|
@ -114,7 +114,7 @@ module.exports = UserSessionsManager =
|
|||
callback(null)
|
||||
|
||||
touch: (user, callback=(err)->) ->
|
||||
if !user
|
||||
if !user?
|
||||
logger.log {}, "no user to touch sessions for, returning"
|
||||
return callback(null)
|
||||
sessionSetKey = UserSessionsRedis.sessionSetKey(user)
|
||||
|
@ -125,7 +125,7 @@ module.exports = UserSessionsManager =
|
|||
callback(null)
|
||||
|
||||
_checkSessions: (user, callback=(err)->) ->
|
||||
if !user
|
||||
if !user?
|
||||
logger.log {}, "no user, returning"
|
||||
return callback(null)
|
||||
logger.log {user_id: user._id}, "checking sessions for user"
|
||||
|
|
Loading…
Reference in a new issue