Dispatch return undefined
justmealf opened this issue · 0 comments
justmealf commented
Hi, i've try to get return value after dispatch login but always return undefined
handleLogin() { this.$refs.loginForm.validate(valid => { if (valid) { this.loading = true; csrf().then(() => { this.$store.dispatch('user/login', this.loginForm) .then((response) => { console.log(response); this.loading = false; }) .catch(() => { this.loading = false; }); }); } else { console.log('error submit!!'); return false; } }); },