Skip to content

Commit

Permalink
fix(routing): fallback to hard navigation when soft navigation fails. (
Browse files Browse the repository at this point in the history
  • Loading branch information
iamriajul committed Jan 18, 2024
1 parent 6eec3bd commit f12c1b0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/qwik-city/runtime/src/qwik-city-component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,13 @@ export const QwikCityProvider = component$<QwikCityProps>((props) => {
trackUrl.pathname
);
}
loadedRoute = await loadRoutePromise;

try {
loadedRoute = await loadRoutePromise;
} catch (e) {
window.location.href = newHref;
return;
}
}

if (loadedRoute) {
Expand Down

0 comments on commit f12c1b0

Please sign in to comment.