Skip to content

Commit 7037663

Browse files
committed
Rename variable
1 parent e2e8adb commit 7037663

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/react-router/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -538,13 +538,13 @@ function useRoutes_(
538538
);
539539
}
540540

541-
let constructedBasename = basename
541+
let basenameForMatching = basename
542542
? joinPaths([parentPathname, basename])
543543
: parentPathname;
544544

545545
let matches = React.useMemo(
546-
() => matchRoutes(routes, location, constructedBasename),
547-
[location, routes, constructedBasename]
546+
() => matchRoutes(routes, location, basenameForMatching),
547+
[location, routes, basenameForMatching]
548548
);
549549

550550
if (!matches) {
@@ -560,7 +560,7 @@ function useRoutes_(
560560
value={{
561561
outlet,
562562
params: readOnly<Params>({ ...parentParams, ...params }),
563-
pathname: joinPaths([constructedBasename, pathname]),
563+
pathname: joinPaths([basenameForMatching, pathname]),
564564
basename,
565565
route
566566
}}

0 commit comments

Comments
 (0)