@remix-run/router 1.2.1-pre.0 → 1.2.1-pre.1
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 +7 -0
- package/dist/router.cjs.js +6 -12
- package/dist/router.cjs.js.map +1 -1
- package/dist/router.js +6 -12
- package/dist/router.js.map +1 -1
- package/dist/router.umd.js +6 -12
- 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 +5 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# `@remix-run/router`
|
|
2
2
|
|
|
3
|
+
## 1.2.1-pre.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Reset `actionData` on action redirect to current location ([#9772](https://github.com/remix-run/react-router/pull/9772))
|
|
8
|
+
- Fix fetcher shouldRevalidate ([#9782](https://github.com/remix-run/react-router/pull/9782))
|
|
9
|
+
|
|
3
10
|
## 1.2.1-pre.0
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
package/dist/router.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @remix-run/router v1.2.1-pre.
|
|
2
|
+
* @remix-run/router v1.2.1-pre.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -1546,17 +1546,14 @@ function createRouter(init) {
|
|
|
1546
1546
|
|
|
1547
1547
|
|
|
1548
1548
|
function completeNavigation(location, newState) {
|
|
1549
|
-
var
|
|
1549
|
+
var _location$state;
|
|
1550
1550
|
|
|
1551
1551
|
// Deduce if we're in a loading/actionReload state:
|
|
1552
1552
|
// - We have committed actionData in the store
|
|
1553
|
-
// - The current navigation was a submission
|
|
1553
|
+
// - The current navigation was a mutation submission
|
|
1554
1554
|
// - We're past the submitting state and into the loading state
|
|
1555
|
-
// - The location
|
|
1556
|
-
|
|
1557
|
-
// positives for loading/submissionRedirect when actionData returned
|
|
1558
|
-
// on a prior submission)
|
|
1559
|
-
let isActionReload = state.actionData != null && state.navigation.formMethod != null && state.navigation.state === "loading" && ((_state$navigation$for = state.navigation.formAction) == null ? void 0 : _state$navigation$for.split("?")[0]) === location.pathname;
|
|
1555
|
+
// - The location being loaded is not the result of a redirect
|
|
1556
|
+
let isActionReload = state.actionData != null && state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && state.navigation.state === "loading" && ((_location$state = location.state) == null ? void 0 : _location$state._isRedirect) !== true;
|
|
1560
1557
|
let actionData;
|
|
1561
1558
|
|
|
1562
1559
|
if (newState.actionData) {
|
|
@@ -2119,7 +2116,6 @@ function createRouter(init) {
|
|
|
2119
2116
|
fetchers: new Map(state.fetchers)
|
|
2120
2117
|
});
|
|
2121
2118
|
return startRedirectNavigation(state, actionResult, {
|
|
2122
|
-
submission,
|
|
2123
2119
|
isFetchActionRedirect: true
|
|
2124
2120
|
});
|
|
2125
2121
|
} // Process any non-redirect errors thrown
|
|
@@ -2198,9 +2194,7 @@ function createRouter(init) {
|
|
|
2198
2194
|
let redirect = findRedirect(results);
|
|
2199
2195
|
|
|
2200
2196
|
if (redirect) {
|
|
2201
|
-
return startRedirectNavigation(state, redirect
|
|
2202
|
-
submission
|
|
2203
|
-
});
|
|
2197
|
+
return startRedirectNavigation(state, redirect);
|
|
2204
2198
|
} // Process and commit output from loaders
|
|
2205
2199
|
|
|
2206
2200
|
|