diff --git a/frontend/src/plugins/router.js b/frontend/src/plugins/router.js index c5599f730..332a2107a 100644 --- a/frontend/src/plugins/router.js +++ b/frontend/src/plugins/router.js @@ -39,6 +39,7 @@ const routes = [ }, { path: "/:pathMatch(.*)*", + name: "noMatch", component: () => import("@/views/Dashboard.vue"), }, ], @@ -59,6 +60,8 @@ router.beforeEach(async (to, from) => { return { name: "login" }; } else if (isAuthenticated() && to.name === "login") { return { name: "dashboard" }; + } else if (to.name == "noMatch"){ + return { name: "dashboard" }; } });