Skip to content

Commit 7ea19b5

Browse files
author
Michail Yasonik
committed
legacy href fix
1 parent 2569129 commit 7ea19b5

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/core/public/chrome/nav_links/to_nav_link.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@ export function toNavLink(
4242
legacy: isLegacyApp(app),
4343
baseUrl,
4444
...(isLegacyApp(app)
45-
? {
46-
href: url && !url.startsWith(app.subUrlBase!) ? url : baseUrl,
47-
}
45+
? {}
4846
: {
4947
href: url,
5048
url,

src/core/public/chrome/ui/header/nav_link.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,12 @@ export function createEuiListItem({
5555
navigateToApp,
5656
dataTestSubj,
5757
}: Props) {
58-
const { legacy, active, id, title, disabled, euiIconType, icon, tooltip, href } = link;
58+
const { legacy, active, id, title, disabled, euiIconType, icon, tooltip } = link;
59+
let { href } = link;
60+
61+
if (legacy) {
62+
href = link.url && !active ? link.url : link.baseUrl;
63+
}
5964

6065
return {
6166
label: tooltip ?? title,

0 commit comments

Comments
 (0)