Skip to content

Commit 23b12d5

Browse files
author
Pooya Parsa
committed
fix(store): skip only if token is not set. resolves #20.
1 parent e4bfd4e commit 23b12d5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/templates/auth.store.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,12 @@ export default {
116116
<% if (options.token.enabled) { %>
117117
// Fetch and update latest token
118118
dispatch('fetchToken')
119-
<% } %>
120119

121-
// Skip if not loggedIn
122-
if (!getters.loggedIn) {
120+
// Skip if there is no token set
121+
if (!state.token) {
123122
return
124123
}
124+
<% } %>
125125

126126
// Try to get user profile
127127
try {

0 commit comments

Comments
 (0)