@tanstack/router-devtools 0.0.1-beta.235 → 0.0.1-beta.236

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -793,7 +793,7 @@
793
793
  setActiveRouteId
794
794
  }) {
795
795
  const router = useRouter();
796
- const matches = router.state.status === 'pending' ? router.state.pendingMatches : router.state.matches;
796
+ const matches = router.state.status === 'pending' ? router.state.pendingMatches ?? [] : router.state.matches;
797
797
  const match = router.state.matches.find(d => d.routeId === route.id);
798
798
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
799
799
  role: "button",
@@ -861,7 +861,7 @@
861
861
  ...panelProps
862
862
  } = props;
863
863
  const router = useRouter();
864
- const matches = [...router.state.pendingMatches, ...router.state.matches];
864
+ const matches = [...(router.state.pendingMatches ?? []), ...router.state.matches];
865
865
  invariant(router, 'No router was found for the TanStack Router Devtools. Please place the devtools in the <RouterProvider> component tree or pass the router instance to the devtools manually.');
866
866
 
867
867
  // useStore(router.__store)
@@ -1093,7 +1093,7 @@
1093
1093
  isRoot: true,
1094
1094
  activeRouteId: activeRouteId,
1095
1095
  setActiveRouteId: setActiveRouteId
1096
- }) : /*#__PURE__*/React.createElement("div", null, (router.state.status === 'pending' ? router.state.pendingMatches : router.state.matches).map((match, i) => {
1096
+ }) : /*#__PURE__*/React.createElement("div", null, (router.state.status === 'pending' ? router.state.pendingMatches ?? [] : router.state.matches).map((match, i) => {
1097
1097
  return /*#__PURE__*/React.createElement("div", {
1098
1098
  key: match.routeId || i,
1099
1099
  role: "button",