From 35f31d5a3ca81f15d215564332531a5c778b38e8 Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Thu, 3 Aug 2017 13:17:39 +0100 Subject: [PATCH] null check the user correctly --- .../web/app/coffee/Features/User/UserSessionsManager.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/web/app/coffee/Features/User/UserSessionsManager.coffee b/services/web/app/coffee/Features/User/UserSessionsManager.coffee index 273c7fe4a9..57590a42b4 100644 --- a/services/web/app/coffee/Features/User/UserSessionsManager.coffee +++ b/services/web/app/coffee/Features/User/UserSessionsManager.coffee @@ -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"