Browse Source

Remove logOut call when refreshing the page and not logged in, to avoid changing the URL

pull/1039/head
Andrew Kingston 5 years ago
parent
commit
08cbfd705f
  1. 12
      packages/client/src/store/auth.js

12
packages/client/src/store/auth.js

@ -52,16 +52,8 @@ const createAuthStore = () => {
// Or fetch the current user from localstorage in a real app
else {
if (get(store) == null) {
const user = await API.fetchSelf()
if (user) {
store.set(user)
} else {
await logOut()
}
} else {
await logOut()
}
const user = await API.fetchSelf()
store.set(user)
}
}

Loading…
Cancel
Save