diff --git a/frontend/src/components/routing/ViewSetRouter.tsx b/frontend/src/components/routing/ViewSetRouter.tsx index 4f31963..c6d3605 100644 --- a/frontend/src/components/routing/ViewSetRouter.tsx +++ b/frontend/src/components/routing/ViewSetRouter.tsx @@ -55,7 +55,7 @@ export function ViewSetRouter({viewSet, unselec selection = viewSet.resources?.find(res => res.value[pkKey] === pk) if(!selection) { return ( - + ) } } diff --git a/frontend/src/utils/ParsePath.ts b/frontend/src/utils/ParsePath.ts index ace1476..1d692ce 100644 --- a/frontend/src/utils/ParsePath.ts +++ b/frontend/src/utils/ParsePath.ts @@ -63,7 +63,7 @@ function parsePathSegment({path, parsed, regex, key, next}: ParsePathSegmentConf // If the match fails, it means the matching is over if(!match || !match.groups) { - parsed.valid = path === "/" + parsed.valid = path === "" || path === "/" return parsed } @@ -73,7 +73,7 @@ function parsePathSegment({path, parsed, regex, key, next}: ParsePathSegmentConf parsed.count += 1 const results = next.map((func) => { - return func(rest, parsed) + return func(rest ?? "", parsed) }).reduce((a, b) => { return {...a, ...b} }, {})