From d7c78d0b28b93fef674249c014ed23569f656276 Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Fri, 16 Oct 2015 20:26:25 -0700 Subject: [PATCH] adding check for missing session time from local storage for gracefully failing if session time isn't set --- .../src/login/authenticationServices/timer.factory.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/awx/ui/client/src/login/authenticationServices/timer.factory.js b/awx/ui/client/src/login/authenticationServices/timer.factory.js index 54ebf99006..13ead3af02 100644 --- a/awx/ui/client/src/login/authenticationServices/timer.factory.js +++ b/awx/ui/client/src/login/authenticationServices/timer.factory.js @@ -32,7 +32,13 @@ export default timeout: null, getSessionTime: function () { - return Store('sessionTime_'+$rootScope.current_user.id); + if(Store('sessionTime_'+$rootScope.current_user.id)){ + return Store('sessionTime_'+$rootScope.current_user.id); + } + else { + return 0; + } + }, isExpired: function (increase) {