From c0e8111d642ca9f85fbb4091f2ac9e86f4238a58 Mon Sep 17 00:00:00 2001 From: wakarimasen Date: Wed, 8 Mar 2017 19:08:01 +0100 Subject: [PATCH] Clear username and password field on failed login --- src/components/login_form/login_form.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/login_form/login_form.js b/src/components/login_form/login_form.js index 2ad5b0b5..e489f381 100644 --- a/src/components/login_form/login_form.js +++ b/src/components/login_form/login_form.js @@ -10,7 +10,11 @@ const LoginForm = { submit () { this.$store.dispatch('loginUser', this.user).then( () => { this.$router.push('/main/friends')}, - () => { this.authError = true } + () => { + this.authError = true + this.user.username = '' + this.user.password = '' + } ) } }