浏览代码

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");
 	}