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

This commit is contained in:
Andrew Kingston 2021-01-28 14:51:24 +00:00
parent b4ccf9c1d2
commit 08cbfd705f
1 changed files with 2 additions and 10 deletions

View File

@ -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()
}
}
}