Просмотр исходного кода

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 3 лет назад
Родитель
Сommit
7c033fc9b5
1 измененных файлов с 4 добавлено и 1 удалено
  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");
 		}