Skip to content

Commit ae876b5

Browse files
(fix) Navlinks with spaces and special characters should get highlighted when active (#1446)
1 parent 2acbbde commit ae876b5

File tree

1 file changed

+2
-2
lines changed
  • packages/framework/esm-styleguide/src/dashboard-extension

1 file changed

+2
-2
lines changed

packages/framework/esm-styleguide/src/dashboard-extension/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ export const DashboardExtension = ({ path, title, basePath, icon }: DashboardExt
2525
if (p.startsWith('http')) {
2626
return p === window.location.href;
2727
}
28-
const paths = p.split('/');
28+
const paths = p.split('/').map((s) => decodeURIComponent(s));
2929

3030
const localPath = (location.pathname ?? '')
3131
.split('/')
3232
.slice(-1 * paths.length)
33-
.map(s => decodeURI(s));
33+
.map((s) => decodeURIComponent(s));
3434
return shallowEqual(paths, localPath);
3535
}, [location.pathname, path]);
3636

0 commit comments

Comments
 (0)