@tanstack/router-devtools 0.0.1-beta.234 → 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.
- package/build/cjs/devtools.js +3 -3
- package/build/cjs/devtools.js.map +1 -1
- package/build/esm/index.js +3 -3
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +311 -112
- package/build/umd/index.development.js +3 -3
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +2 -2
- package/src/devtools.tsx +29 -26
|
@@ -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",
|