@remix-run/router 1.15.1 → 1.15.2
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/CHANGELOG.md +6 -0
- package/dist/router.cjs.js +19 -6
- package/dist/router.cjs.js.map +1 -1
- package/dist/router.js +18 -6
- package/dist/router.js.map +1 -1
- package/dist/router.umd.js +19 -6
- package/dist/router.umd.js.map +1 -1
- package/dist/router.umd.min.js +2 -2
- package/dist/router.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/router.ts +10 -1
package/package.json
CHANGED
package/router.ts
CHANGED
|
@@ -1718,7 +1718,7 @@ export function createRouter(init: RouterInit): Router {
|
|
|
1718
1718
|
// preserving any new action data or existing action data (in the case of
|
|
1719
1719
|
// a revalidation interrupting an actionReload)
|
|
1720
1720
|
// If we have partialHydration enabled, then don't update the state for the
|
|
1721
|
-
// initial data load since
|
|
1721
|
+
// initial data load since it's not a "navigation"
|
|
1722
1722
|
if (
|
|
1723
1723
|
!isUninterruptedRevalidation &&
|
|
1724
1724
|
(!future.v7_partialHydration || !initialHydration)
|
|
@@ -1835,6 +1835,15 @@ export function createRouter(init: RouterInit): Router {
|
|
|
1835
1835
|
});
|
|
1836
1836
|
});
|
|
1837
1837
|
|
|
1838
|
+
// During partial hydration, preserve SSR errors for routes that don't re-run
|
|
1839
|
+
if (future.v7_partialHydration && initialHydration && state.errors) {
|
|
1840
|
+
Object.entries(state.errors)
|
|
1841
|
+
.filter(([id]) => !matchesToLoad.some((m) => m.route.id === id))
|
|
1842
|
+
.forEach(([routeId, error]) => {
|
|
1843
|
+
errors = Object.assign(errors || {}, { [routeId]: error });
|
|
1844
|
+
});
|
|
1845
|
+
}
|
|
1846
|
+
|
|
1838
1847
|
let updatedFetchers = markFetchRedirectsDone();
|
|
1839
1848
|
let didAbortFetchLoads = abortStaleFetchLoads(pendingNavigationLoadId);
|
|
1840
1849
|
let shouldUpdateFetchers =
|