@tanstack/react-router 0.0.1-beta.217 → 0.0.1-beta.218
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/Matches.js +5 -3
- package/build/cjs/Matches.js.map +1 -1
- package/build/esm/index.js +5 -3
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +261 -261
- package/build/umd/index.development.js +5 -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/Matches.tsx +29 -21
|
@@ -2141,7 +2141,7 @@
|
|
|
2141
2141
|
const PendingComponent = route.options.pendingComponent ?? options.defaultPendingComponent ?? defaultPending;
|
|
2142
2142
|
const routeErrorComponent = route.options.errorComponent ?? options.defaultErrorComponent ?? ErrorComponent;
|
|
2143
2143
|
const ResolvedSuspenseBoundary = route.options.wrapInSuspense ? React__namespace.Suspense : SafeFragment;
|
|
2144
|
-
const errorComponent = React__namespace.useCallback(props => {
|
|
2144
|
+
const errorComponent = routeErrorComponent ? React__namespace.useCallback(props => {
|
|
2145
2145
|
return /*#__PURE__*/React__namespace.createElement(routeErrorComponent, {
|
|
2146
2146
|
...props,
|
|
2147
2147
|
useMatch: route.useMatch,
|
|
@@ -2149,7 +2149,7 @@
|
|
|
2149
2149
|
useSearch: route.useSearch,
|
|
2150
2150
|
useParams: route.useParams
|
|
2151
2151
|
});
|
|
2152
|
-
}, [route]);
|
|
2152
|
+
}, [route]) : undefined;
|
|
2153
2153
|
return /*#__PURE__*/React__namespace.createElement(matchesContext.Provider, {
|
|
2154
2154
|
value: matches
|
|
2155
2155
|
}, /*#__PURE__*/React__namespace.createElement(ResolvedSuspenseBoundary, {
|
|
@@ -2159,7 +2159,7 @@
|
|
|
2159
2159
|
useSearch: route.useSearch,
|
|
2160
2160
|
useParams: route.useParams
|
|
2161
2161
|
})
|
|
2162
|
-
}, /*#__PURE__*/React__namespace.createElement(CatchBoundary, {
|
|
2162
|
+
}, errorComponent ? /*#__PURE__*/React__namespace.createElement(CatchBoundary, {
|
|
2163
2163
|
resetKey: locationKey,
|
|
2164
2164
|
errorComponent: errorComponent,
|
|
2165
2165
|
onCatch: () => {
|
|
@@ -2167,6 +2167,8 @@
|
|
|
2167
2167
|
}
|
|
2168
2168
|
}, /*#__PURE__*/React__namespace.createElement(MatchInner, {
|
|
2169
2169
|
match: match
|
|
2170
|
+
})) : /*#__PURE__*/React__namespace.createElement(SafeFragment, null, /*#__PURE__*/React__namespace.createElement(MatchInner, {
|
|
2171
|
+
match: match
|
|
2170
2172
|
}))));
|
|
2171
2173
|
}
|
|
2172
2174
|
function MatchInner({
|