Skip to content

Commit

Permalink
invokeRedirector fix
Browse files Browse the repository at this point in the history
invokeRedirector fix
  • Loading branch information
ValeriyRadchenko authored Oct 21, 2016
1 parent 0c7889d commit 25b1279
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/angularJwt/services/authManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ angular.module('angular-jwt.authManager', [])
}

function invokeRedirector(redirector) {
if (Array.isArray(redirector)) {
return $injector.invoke(redirector, this, {});
if (Array.isArray(redirector) || angular.isFunction(redirector)) {
return $injector.invoke(redirector, config, {});
} else {
return redirector($location);
throw new Error('unauthenticatedRedirector must be a function');
}
}

Expand Down

0 comments on commit 25b1279

Please sign in to comment.