Skip to content

Commit

Permalink
Fix frame reload on 404 (SAP#378)
Browse files Browse the repository at this point in the history
Fix frame reload on 404 error
  • Loading branch information
dariadomagala-sap authored and pekura committed Jan 23, 2019
1 parent 9796560 commit 6d93924
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/src/services/routing.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ export const getCurrentPath = () =>
LuigiConfig.getConfigValue('routing.useHashRouting')
? window.location.hash.replace('#', '') // TODO: GenericHelpers.getPathWithoutHash(window.location.hash) fails in ContextSwitcher
: window.location.search
? GenericHelpers.trimLeadingSlash(window.location.pathname) +
window.location.search
: GenericHelpers.trimLeadingSlash(window.location.pathname);
? GenericHelpers.trimLeadingSlash(window.location.pathname) +
window.location.search
: GenericHelpers.trimLeadingSlash(window.location.pathname);

export const handleRouteChange = async (
path,
Expand Down Expand Up @@ -194,6 +194,7 @@ export const handleRouteChange = async (

if (!pathData.isExistingRoute) {
showPageNotFoundError(component, pathData.matchedPath, pathUrlRaw, true);
return;
}

const hideNav = LuigiConfig.getConfigBooleanValue(
Expand Down

0 comments on commit 6d93924

Please sign in to comment.