Skip to content

Commit fc38d91

Browse files
authored
refactor(router-core): remove dead code in buildLocation left over from reverting match snapshots (#6510)
1 parent e59c800 commit fc38d91

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

packages/router-core/src/router.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1821,16 +1821,8 @@ export class RouterCore<
18211821
destMatchResult.routeParams['**']
18221822
: trimPathRight(interpolatedNextTo)
18231823

1824-
let globalNotFoundRouteId: string | undefined
1825-
if (isGlobalNotFound) {
1826-
if (this.options.notFoundRoute) {
1827-
destRoutes = [...destRoutes, this.options.notFoundRoute]
1828-
} else {
1829-
globalNotFoundRouteId = findGlobalNotFoundRouteId(
1830-
this.options.notFoundMode,
1831-
destRoutes,
1832-
)
1833-
}
1824+
if (isGlobalNotFound && this.options.notFoundRoute) {
1825+
destRoutes = [...destRoutes, this.options.notFoundRoute]
18341826
}
18351827

18361828
// If there are any params, we need to stringify them

0 commit comments

Comments
 (0)