From 64f16eda733b36e592f9c3bc1e0091deb6a51ff6 Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Fri, 8 Nov 2024 16:01:26 +0100 Subject: [PATCH] fix: we even also need to involve the latest "version" (#3435) --- .../components/version-switcher/version-switcher.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/showcases/patternhub/components/version-switcher/version-switcher.tsx b/showcases/patternhub/components/version-switcher/version-switcher.tsx index 3020f708399..ad8db938068 100644 --- a/showcases/patternhub/components/version-switcher/version-switcher.tsx +++ b/showcases/patternhub/components/version-switcher/version-switcher.tsx @@ -100,7 +100,9 @@ const VersionSwitcher = () => { const handleChange = (branch: string) => { const lastPath = router.asPath; - const isTag = branch.split('.').length === 3 && branch.startsWith('v'); + const isTag = + (branch.split('.').length === 3 && branch.startsWith('v')) || + branch === 'latest'; window.location.replace( sanitize( `https://${owner}.github.io/${repo}${