From 71b660136011d96008a383e2099e37b7e1b744c5 Mon Sep 17 00:00:00 2001 From: Jakob Scheid Date: Tue, 28 Jul 2026 20:13:08 +0200 Subject: [PATCH] fix(settings): catch all of /settings route subpath --- src/router/index.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/router/index.js b/src/router/index.js index f81b523..18fe434 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -40,7 +40,7 @@ const routes = [ } }, { - path: '/settings', + path: '/settings/:rest(.*)*', name: 'settings', component: SettingsView, meta: { @@ -72,4 +72,16 @@ export const updatePageTitle = function updatePageTitle (route) { }; }; +// remove trailing slash(es) +router.beforeEach((route) => { + if (route.path !== '/' && route.path.endsWith('/')) { + return { + path: route.path.replace(/\/+$/, ''), + query: route.query, + hash: route.hash, + replace: true + }; + }; +}); + export default router; \ No newline at end of file