diff --git a/lib/templates/auth.store.js b/lib/templates/auth.store.js index 551a83eff..b5e55821a 100644 --- a/lib/templates/auth.store.js +++ b/lib/templates/auth.store.js @@ -116,12 +116,12 @@ export default { <% if (options.token.enabled) { %> // Fetch and update latest token dispatch('fetchToken') - <% } %> - // Skip if not loggedIn - if (!getters.loggedIn) { + // Skip if there is no token set + if (!state.token) { return } + <% } %> // Try to get user profile try {