diff --git a/packages/qwik-city/runtime/src/route-matcher.ts b/packages/qwik-city/runtime/src/route-matcher.ts index 1fb4018dc30..774b899e6b2 100644 --- a/packages/qwik-city/runtime/src/route-matcher.ts +++ b/packages/qwik-city/runtime/src/route-matcher.ts @@ -144,7 +144,7 @@ function recursiveScan( } let pathIdx = pathLength; const sep = suffix + '/'; - let depthWatchdog = 5; + let depthWatchdog = 8; while (pathIdx >= pathStart && depthWatchdog--) { const match = matchRoutePart(route, routeStart, routeLength, path, pathIdx, pathLength); if (match) { diff --git a/packages/qwik-city/utils/fs.ts b/packages/qwik-city/utils/fs.ts index d69f229bbab..5497a5e1a4c 100644 --- a/packages/qwik-city/utils/fs.ts +++ b/packages/qwik-city/utils/fs.ts @@ -33,7 +33,6 @@ export function getPathnameFromDirPath(opts: NormalizedPluginOptions, dirPath: s // remove grouped layout segments .filter((segment) => !isGroupedLayoutName(segment)) .join('/'); - return pathname; } diff --git a/starters/apps/qwikcity-test/src/routes/issue6300/deep/nested/[id]/index.tsx b/starters/apps/qwikcity-test/src/routes/issue6300/deep/nested/[id]/index.tsx new file mode 100644 index 00000000000..7fd3cea80a5 --- /dev/null +++ b/starters/apps/qwikcity-test/src/routes/issue6300/deep/nested/[id]/index.tsx @@ -0,0 +1,8 @@ +import { useLocation } from '@builder.io/qwik-city'; +import { component$ } from '@builder.io/qwik'; + +export default component$(() => { + const { url } = useLocation(); + + return
Working nesting with ID {url.pathname}
; +});