Pārlūkot izejas kodu

refactor(frontend): GitHub redirect overriding url queries

Signed-off-by: Jonathan Graham <theflametrooper@gmail.com>
Jonathan Graham 3 gadi atpakaļ
vecāks
revīzija
f96b75842d
1 mainītis faili ar 5 papildinājumiem un 10 dzēšanām
  1. 5 10
      frontend/src/App.vue

+ 5 - 10
frontend/src/App.vue

@@ -144,16 +144,6 @@ export default {
 			}
 		});
 
-		if (localStorage.getItem("github_redirect")) {
-			setTimeout(
-				() =>
-					this.$router.push(localStorage.getItem("github_redirect")),
-				50
-			);
-
-			localStorage.removeItem("github_redirect");
-		}
-
 		this.disconnectedMessage = new Toast({
 			content: "Could not connect to the server.",
 			persistent: true,
@@ -211,6 +201,11 @@ export default {
 				this.$router.push({ query: {} });
 				new Toast({ content: msg, timeout: 20000 });
 			}
+
+			if (localStorage.getItem("github_redirect")) {
+				this.$router.push(localStorage.getItem("github_redirect"));
+				localStorage.removeItem("github_redirect");
+			}
 		});
 
 		if (localStorage.getItem("nightmode") === "true") {