diff --git a/packages/website/src/components/SidebarLayout.tsx b/packages/website/src/components/SidebarLayout.tsx
index 4592d5751..ff2ec1e28 100644
--- a/packages/website/src/components/SidebarLayout.tsx
+++ b/packages/website/src/components/SidebarLayout.tsx
@@ -97,7 +97,7 @@ export function SidebarLayout({ packageName, data, children }: PropsWithChildren
));
- const asPathWithoutQuery = router.asPath.split('?')[0];
+ const asPathWithoutQuery = router.asPath.split('?')[0]?.split('#')[0];
const breadcrumbs = asPathWithoutQuery?.split('/').map((path, idx, original) => (
{path}