소스 검색

fix: close manageStation when coming from admin as well

Kristian Vos 2 년 전
부모
커밋
c46aebf1e9
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  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");
 	}