diff --git a/packages/keystatic/src/app/shell/sidebar/index.tsx b/packages/keystatic/src/app/shell/sidebar/index.tsx index 877152340..be387259f 100644 --- a/packages/keystatic/src/app/shell/sidebar/index.tsx +++ b/packages/keystatic/src/app/shell/sidebar/index.tsx @@ -270,7 +270,7 @@ function useIsCurrent() { if (exact) { return href === router.pathname ? 'page' : undefined; } - return href === router.pathname || href.startsWith(`${router.pathname}/`) + return href === router.pathname || router.pathname.startsWith(`${href}/`) ? 'page' : undefined; },