Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand Down
Loading