Skip to content

Commit edff46e

Browse files
author
Okeanij
committed
Login fix
1 parent 1042a3c commit edff46e

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

Client/src/modules/auth/Login.vue

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,16 @@ export default {
8989
password: this.password
9090
})
9191
.then(_ => {
92-
if (this.ret && !this.$route.path.startsWith(this.ret))
93-
this.$router.replace(this.ret);
94-
else this.$router.replace({ name: "Home" });
92+
try {
93+
if (this.ret && this.$route.name !== "Home")
94+
this.$router.replace(this.ret);
95+
else this.$router.replace({ name: "Home" });
96+
} catch (_) {
97+
this.$router.replace({ name: "Home" });
98+
}
9599
})
96100
.catch(error => {
97-
console.log(error);
101+
console.log(error);
98102
this.submitting = false;
99103
this.$errorNotify(error);
100104
});

0 commit comments

Comments
 (0)