Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
9d00587de1
commit
9f714e2f50
|
@ -57,7 +57,7 @@ import {
|
|||
} from '../..';
|
||||
import { HttpStart } from '../../../http';
|
||||
import { ChromeHelpExtension } from '../../chrome_service';
|
||||
import { ApplicationStart, InternalApplicationStart } from '../../../application/types';
|
||||
import { InternalApplicationStart } from '../../../application/types';
|
||||
|
||||
// Providing a buffer between the limit and the cut off index
|
||||
// protects from truncating just the last couple (6) characters
|
||||
|
@ -108,7 +108,7 @@ function extendRecentlyAccessedHistoryItem(
|
|||
};
|
||||
}
|
||||
|
||||
function extendNavLink(navLink: ChromeNavLink, urlForApp: ApplicationStart['getUrlForApp']) {
|
||||
function extendNavLink(navLink: ChromeNavLink) {
|
||||
if (navLink.legacy) {
|
||||
return {
|
||||
...navLink,
|
||||
|
@ -118,7 +118,7 @@ function extendNavLink(navLink: ChromeNavLink, urlForApp: ApplicationStart['getU
|
|||
|
||||
return {
|
||||
...navLink,
|
||||
href: urlForApp(navLink.id),
|
||||
href: navLink.baseUrl,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -229,9 +229,7 @@ class HeaderUI extends Component<Props, State> {
|
|||
appTitle,
|
||||
isVisible,
|
||||
forceNavigation,
|
||||
navLinks: navLinks.map(navLink =>
|
||||
extendNavLink(navLink, this.props.application.getUrlForApp)
|
||||
),
|
||||
navLinks: navLinks.map(extendNavLink),
|
||||
recentlyAccessed: recentlyAccessed.map(ra =>
|
||||
extendRecentlyAccessedHistoryItem(navLinks, ra, this.props.basePath)
|
||||
),
|
||||
|
|
Loading…
Reference in a new issue