From 6ad8160aa3309314c1b471c5090b67c824464396 Mon Sep 17 00:00:00 2001 From: Jose Olcese <3219544+jolcese@users.noreply.github.com> Date: Thu, 21 May 2026 06:39:45 -0700 Subject: [PATCH] fix(router): handle undefined catchAll param on root redirect (#5955) --- frontend/src/router/index.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts index 60e7b636..a39482e1 100644 --- a/frontend/src/router/index.ts +++ b/frontend/src/router/index.ts @@ -145,8 +145,11 @@ const routes = [ }, { path: "/:catchAll(.*)*", - redirect: (to: RouteLocation) => - `/files/${[...to.params.catchAll].join("/")}`, + redirect: (to: RouteLocation) => { + const catchAll = to.params.catchAll; + if (!catchAll) return "/files/"; + return `/files/${Array.isArray(catchAll) ? catchAll.join("/") : catchAll}`; + }, }, ];