Skip to content

Commit 95e9862

Browse files
committed
fix: fix docs source
1 parent 64b2eed commit 95e9862

File tree

1 file changed

+2
-2
lines changed
  • apps/docs/src/app/docs/[[...slug]]

1 file changed

+2
-2
lines changed

apps/docs/src/app/docs/[[...slug]]/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ export default async function Docs(props: {
2424
const docId = getDocId(locale, docUrl);
2525
const page = getPage(docUrl);
2626
if (!page) notFound();
27-
const { isApp, isPages } = parseDocId(docId);
27+
const { isApp, isPages, isVLatest, version } = parseDocId(docId);
2828

2929
let { body: MdxContent, toc } = await page.data.load();
3030

3131
// source: app/getting-started/installation
3232
const ref = page.data.source;
3333
if (ref) {
34-
const refUrl = getDocUrl(ref);
34+
const refUrl = getDocUrl(isVLatest ? ref : `${version}/${ref}`);
3535
const refPage = getPage(refUrl);
3636
if (!refPage) notFound();
3737

0 commit comments

Comments
 (0)