Skip to content

Commit

Permalink
fix createAppNavigationHandler to use navigateToUrl (elastic#78583)
Browse files Browse the repository at this point in the history
  • Loading branch information
pgayvallet authored and scottybollinger committed Sep 28, 2020
1 parent 8b50baa commit 9f5a852
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@ export const createAppNavigationHandler = (targetUrl: string) => (event: MouseEv
if (event.altKey || event.metaKey || event.ctrlKey) {
return;
}
if (targetUrl.startsWith('/app/')) {
const [, appId, path] = /\/app\/(.*?)((\/|\?|#|$).*)/.exec(targetUrl) || [];
if (!appId) {
return;
}
event.preventDefault();
getServices().application.navigateToApp(appId, { path });
}
event.preventDefault();
getServices().application.navigateToUrl(targetUrl);
};

0 comments on commit 9f5a852

Please sign in to comment.