From 492921b6490310f4e29bc9fa04d4f318753f6922 Mon Sep 17 00:00:00 2001 From: Sean Perkins Date: Thu, 29 Jun 2023 01:16:55 -0400 Subject: [PATCH] chore: migrate matchPath param order in StackManager --- packages/react-router/src/ReactRouter/StackManager.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-router/src/ReactRouter/StackManager.tsx b/packages/react-router/src/ReactRouter/StackManager.tsx index 1acfd48468..603735946d 100644 --- a/packages/react-router/src/ReactRouter/StackManager.tsx +++ b/packages/react-router/src/ReactRouter/StackManager.tsx @@ -438,7 +438,7 @@ function matchRoute(node: React.ReactNode, routeInfo: RouteInfo) { path: child.props.path || child.props.from, component: child.props.component, }; - const match = matchPath(routeInfo.pathname, matchProps); + const match = matchPath(matchProps, routeInfo.pathname); if (match) { matchedNode = child; } @@ -464,7 +464,7 @@ function matchComponent(node: React.ReactElement, pathname: string, forceExact?: path: node.props.path || node.props.from, component: node.props.component, }; - const match = matchPath(pathname, matchProps); + const match = matchPath(matchProps, pathname); return match; }