🐛 (main) do not reset user if bad connection on init app

This commit is contained in:
Julien Calixte
2019-12-17 21:25:21 +01:00
parent 37a903ae53
commit 58701a6ebc

View File

@@ -95,7 +95,9 @@ export default new Vuex.Store<IState>({
if (navigator.onLine && hasGoodNetwork()) {
user = await userService.getUser(user)
}
commit(SET_USER, { user, replicate: false })
if (user) {
commit(SET_USER, { user, replicate: false })
}
},
async signup({ commit }, { user, password, replicate }: IUserPassword) {
const response: IResponse = await userService.signup(user, password)