Преглед на файлове

refactor(frontend): GitHub redirect overriding url queries

Signed-off-by: Jonathan Graham <theflametrooper@gmail.com>
Jonathan Graham преди 3 години
родител
ревизия
f96b75842d
променени са 1 файла, в които са добавени 5 реда и са изтрити 10 реда
  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") {