diff --git a/components/context/PlaygroundContext.tsx b/components/context/PlaygroundContext.tsx index b7f5245cfd..3047070894 100644 --- a/components/context/PlaygroundContext.tsx +++ b/components/context/PlaygroundContext.tsx @@ -59,8 +59,9 @@ export const PlaygroundContextProvider = (props: { children: React.ReactNode }) const router = useRouter() const [activeSectionIndex, setActiveSectionIndex] = useState(0) const [scrollToSection, setScrollToSection] = useState() - const path = router.asPath.split('?')[0].split('#')[0] - + const path = router.asPath.includes('@latest') + ? router.asPath.split('?')[0].split('#')[0].split('@latest')[1] + : router.asPath.split('?')[0].split('#')[0] const relevantArticles = articles.filter(({ slug }) => slug === path) const { langId } = router.query diff --git a/components/playground/CodeLanguagePicker.tsx b/components/playground/CodeLanguagePicker.tsx index f7df48ed4c..83389ed99f 100644 --- a/components/playground/CodeLanguagePicker.tsx +++ b/components/playground/CodeLanguagePicker.tsx @@ -15,7 +15,7 @@ export const CodeLanguagePicker = () => { {language.label}