Skip to content

Commit dafd65a

Browse files
committed
fix(client:auth): exclued user fetching for logout route
1 parent cf38d62 commit dafd65a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/templates/client/components/auth(auth)/auth.service(js).js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
(function() {
44

5-
function AuthService($http, $cookies, $q, appConfig, User) {
5+
function AuthService($location, $http, $cookies, $q, appConfig, User) {
66
/**
77
* Return a callback or noop function
88
*
@@ -16,7 +16,7 @@
1616
currentUser = {},
1717
userRoles = appConfig.userRoles || [];
1818

19-
if ($cookies.get('token')) {
19+
if ($cookies.get('token') && $location.path() !== '/logout') {
2020
currentUser = User.get();
2121
}
2222

0 commit comments

Comments
 (0)