@tanstack/router-core 0.0.1-alpha.7 → 0.0.1-alpha.8
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/packages/router-core/src/router.js +5 -6
- package/build/cjs/packages/router-core/src/router.js.map +1 -1
- package/build/esm/index.js +5 -6
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +132 -132
- package/build/umd/index.development.js +5 -6
- 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 +1 -1
- package/src/router.ts +6 -4
package/package.json
CHANGED
package/src/router.ts
CHANGED
|
@@ -910,16 +910,18 @@ export function createRouter<
|
|
|
910
910
|
// Validate the match (loads search params etc)
|
|
911
911
|
match.__.validate()
|
|
912
912
|
|
|
913
|
-
// If the match doesn't have a loader, don't attempt to load it
|
|
914
|
-
if (!match.hasLoaders()) {
|
|
915
|
-
|
|
916
|
-
}
|
|
913
|
+
// // If the match doesn't have a loader, don't attempt to load it
|
|
914
|
+
// if (!match.hasLoaders()) {
|
|
915
|
+
// return
|
|
916
|
+
// }
|
|
917
|
+
|
|
917
918
|
// If this is a preload, add it to the preload cache
|
|
918
919
|
if (loaderOpts?.preload && loaderOpts?.maxAge > 0) {
|
|
919
920
|
// If the match is currently active, don't preload it
|
|
920
921
|
if (router.state.matches.find((d) => d.matchId === match.matchId)) {
|
|
921
922
|
return
|
|
922
923
|
}
|
|
924
|
+
|
|
923
925
|
router.matchCache[match.matchId] = {
|
|
924
926
|
gc: now + loaderOpts.maxAge, // TODO: Should this use the route's maxAge?
|
|
925
927
|
match,
|