Encountering an error in IE that says: "TypeError: Object doesn't support property or method 'then'", while trying to execute the following function within my AngularJs controller:
GetUserAccessService.checkForValidHashPeriod()
.then(function (result) {
if (result === 'false') {
GetUserAccessService.returnUserHashAuthentication();
}
});
Here's the implementation of the
GetUserAccessService.checkForValidHashPeriod
function from my AngularJs service:
this.checkForValidHashPeriod = function () {
var result;
var now = new Date().getTime();
if ($sessionStorage.userAuthenticationTokenDate !== null && $sessionStorage.userAuthenticationTokenDate !== undefined) {
var timeDiff = now - $sessionStorage.userAuthenticationTokenDate;
}
if (angular.isUndefined($sessionStorage.userAuthenticationToken) || timeDiff > 1500000) {
result = false;
}
else {
result = true;
}
var stringResult = result.toString();
return stringResult;
};
Seeking guidance on what could be causing the issue with using a .then
call?