Explorar o código

fix: github redirect shouldn't be used/cause error due to nav. guards if Login/Register is page

Signed-off-by: Jonathan <theflametrooper@gmail.com>
Jonathan %!s(int64=3) %!d(string=hai) anos
pai
achega
7c033fc9b5
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      frontend/src/App.vue

+ 4 - 1
frontend/src/App.vue

@@ -93,7 +93,10 @@ export default {
 			}
 		});
 
-		if (localStorage.getItem("github_redirect")) {
+		if (
+			localStorage.getItem("github_redirect") &&
+			localStorage.getItem("github_redirect") !== "/login"
+		) {
 			this.$router.push(localStorage.getItem("github_redirect"));
 			localStorage.removeItem("github_redirect");
 		}