Skip to content

Commit

Permalink
fix(store): skip only if token is not set. resolves #20.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pooya Parsa committed Nov 18, 2017
1 parent e4bfd4e commit 23b12d5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/templates/auth.store.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 23b12d5

Please sign in to comment.