From 3630838a86f3f217dbd1a22f2ad9d6f1f2e4bbc9 Mon Sep 17 00:00:00 2001 From: Yihui Liao <44729383+yihuiliao@users.noreply.github.com> Date: Mon, 15 Dec 2025 10:16:06 -0800 Subject: [PATCH] chore: fix broken link in migrating docs --- packages/dev/s2-docs/src/pageUtils.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/dev/s2-docs/src/pageUtils.ts b/packages/dev/s2-docs/src/pageUtils.ts index dd21169530e..cd42a0f8165 100644 --- a/packages/dev/s2-docs/src/pageUtils.ts +++ b/packages/dev/s2-docs/src/pageUtils.ts @@ -41,6 +41,7 @@ export function getRSCUrl(pathname: string) { export function isClientLink(link: HTMLAnchorElement) { let baseUrl = process.env.LIBRARY ? getBaseUrl(process.env.LIBRARY as any) : 'http://localhost:1234'; + return ( link && link instanceof HTMLAnchorElement && @@ -49,6 +50,7 @@ export function isClientLink(link: HTMLAnchorElement) { link.origin === location.origin && !link.hasAttribute('download') && link.href.startsWith(baseUrl) && + !link.href.includes('v3/') && // links with v3 are from the old website !link.pathname.endsWith('.html') // links with .html are from the old website ); }