Skip to content

Commit

Permalink
fix: Evaluate target not active (#19945)
Browse files Browse the repository at this point in the history
For deciding what action to
take we should evaluate where
we are going and not the current
active path.

Fixes vaadin/hilla#2726
  • Loading branch information
caalador authored Sep 13, 2024
1 parent e4a00ab commit e595494
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ function Flow() {
fromAnchor.current = false;
const {pathname, search} = blocker.location;
const routes = ((window as any)?.Vaadin?.routesConfig || []) as AgnosticRouteObject[];
let matched = matchRoutes(Array.from(routes), window.location.pathname);
let matched = matchRoutes(Array.from(routes), pathname);

// Navigation between server routes
// @ts-ignore
Expand Down

0 comments on commit e595494

Please sign in to comment.