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)