Skip to content

Commit

Permalink
fix createAppNavigationHandler to use navigateToUrl (#78583) (#78663)
Browse files Browse the repository at this point in the history
  • Loading branch information
pgayvallet authored Sep 28, 2020
1 parent e01bab8 commit 501e46f
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 501e46f

Please sign in to comment.