Browse Source

fix: close manageStation when coming from admin as well

Kristian Vos 2 years ago
parent
commit
c46aebf1e9
1 changed files with 2 additions and 1 deletions
  1. 2 1
      frontend/src/main.js

+ 2 - 1
frontend/src/main.js

@@ -162,6 +162,7 @@ const router = createRouter({
 		},
 		{
 			path: "/admin",
+			name: "admin",
 			component: () => import("@/pages/Admin/index.vue"),
 			children: [
 				{
@@ -220,7 +221,7 @@ router.beforeEach((to, from, next) => {
 		window.stationInterval = 0;
 	}
 
-	if (from.name === "home" && to.name === "station") {
+	if (to.name === "station") {
 		store.dispatch("modalVisibility/closeModal", "manageStation");
 	}