diff --git a/src/routes/_library/$libraryId/$version.docs.framework.$framework.examples.$.tsx b/src/routes/_library/$libraryId/$version.docs.framework.$framework.examples.$.tsx index 516e59fda..cbed0acb9 100644 --- a/src/routes/_library/$libraryId/$version.docs.framework.$framework.examples.$.tsx +++ b/src/routes/_library/$libraryId/$version.docs.framework.$framework.examples.$.tsx @@ -133,7 +133,7 @@ export const Route = createFileRoute( throw notFound() } - const examplePath = [framework, params._splat].join('/') + const examplePath = [framework, params._splat].filter(Boolean).join('/') const defaultStartingPath = getExampleStartingPath( framework, params.libraryId, @@ -349,7 +349,7 @@ function ExternalExamplePage({ throw notFound() } - const examplePath = [frameworkId, _splat].join('/') + const examplePath = [frameworkId, _splat].filter(Boolean).join('/') const mainExampleFile = getExampleStartingPath(frameworkId, libraryId) @@ -610,7 +610,7 @@ function ClientExamplePage({ const { version, framework, _splat, libraryId } = Route.useParams() const library = getLibrary(libraryId) const branch = getBranch(library, version) - const examplePath = [framework, _splat].join('/') + const examplePath = [framework, _splat].filter(Boolean).join('/') const githubUrl = `https://github.com/${library.repo}/tree/${branch}/examples/${examplePath}` const initialFile = ( definition.initialFile ?? definition.workspace.entry