From 58701a6ebc8d9311afd81e3c1107babfef832cdd Mon Sep 17 00:00:00 2001 From: Julien Calixte Date: Tue, 17 Dec 2019 21:25:21 +0100 Subject: [PATCH] :bug: (main) do not reset user if bad connection on init app --- src/store.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/store.ts b/src/store.ts index 7058ef8..611d672 100644 --- a/src/store.ts +++ b/src/store.ts @@ -95,7 +95,9 @@ export default new Vuex.Store({ 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)