From d2cefe6018c057dc9a7247f7bd0271f2945f6751 Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Wed, 28 Oct 2015 08:47:09 -0700 Subject: [PATCH] adding null pointer check for timer factory when a user logs out from another tab --- .../src/login/authenticationServices/timer.factory.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/awx/ui/client/src/login/authenticationServices/timer.factory.js b/awx/ui/client/src/login/authenticationServices/timer.factory.js index 04478309e3..7bbc3356c4 100644 --- a/awx/ui/client/src/login/authenticationServices/timer.factory.js +++ b/awx/ui/client/src/login/authenticationServices/timer.factory.js @@ -159,9 +159,11 @@ export default that.expireSession('idle'); $location.url('/login'); } - if(Store('sessionTime')[$rootScope.current_user.id].loggedIn === false){ - that.expireSession(); - $location.url('/login'); + if(Store('sessionTime') && + Store('sessionTime')[$rootScope.current_user.id] && + Store('sessionTime')[$rootScope.current_user.id].loggedIn === false){ + that.expireSession(); + $location.url('/login'); }