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 committed Sep 28, 2020
1 parent 9882afc commit 806d6fe
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 806d6fe

Please sign in to comment.