Browse Source

refactor(frontend): GitHub redirect overriding url queries

Signed-off-by: Jonathan Graham <theflametrooper@gmail.com>
Jonathan Graham 3 years ago
parent
commit
f96b75842d
1 changed files with 5 additions and 10 deletions
  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") {