Skip to content

Commit

Permalink
Rename variable
Browse files Browse the repository at this point in the history
  • Loading branch information
mjackson committed Aug 20, 2021
1 parent e2e8adb commit 7037663
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/react-router/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -538,13 +538,13 @@ function useRoutes_(
);
}

let constructedBasename = basename
let basenameForMatching = basename
? joinPaths([parentPathname, basename])
: parentPathname;

let matches = React.useMemo(
() => matchRoutes(routes, location, constructedBasename),
[location, routes, constructedBasename]
() => matchRoutes(routes, location, basenameForMatching),
[location, routes, basenameForMatching]
);

if (!matches) {
Expand All @@ -560,7 +560,7 @@ function useRoutes_(
value={{
outlet,
params: readOnly<Params>({ ...parentParams, ...params }),
pathname: joinPaths([constructedBasename, pathname]),
pathname: joinPaths([basenameForMatching, pathname]),
basename,
route
}}
Expand Down

0 comments on commit 7037663

Please sign in to comment.