From 3af20b6220d8fcded9c8c2f0bdef21dc26d748f6 Mon Sep 17 00:00:00 2001 From: kolaente Date: Wed, 5 Oct 2022 16:51:35 +0200 Subject: [PATCH] fix: don't try to render auth routes when the user is not authenticated Resolves #2419 --- src/router/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/router/index.ts b/src/router/index.ts index 395e305e..05a0d280 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -488,4 +488,8 @@ export function getAuthForRoute(route: RouteLocation) { } } +router.beforeEach((to, from) => { + return getAuthForRoute(to) +}) + export default router \ No newline at end of file