@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/dist/router.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
|
*
|
|
@@ -1498,17 +1498,14 @@ function createRouter(init) {
|
|
|
1498
1498
|
|
|
1499
1499
|
|
|
1500
1500
|
function completeNavigation(location, newState) {
|
|
1501
|
-
var
|
|
1501
|
+
var _location$state;
|
|
1502
1502
|
|
|
1503
1503
|
// Deduce if we're in a loading/actionReload state:
|
|
1504
1504
|
// - We have committed actionData in the store
|
|
1505
|
-
// - The current navigation was a submission
|
|
1505
|
+
// - The current navigation was a mutation submission
|
|
1506
1506
|
// - We're past the submitting state and into the loading state
|
|
1507
|
-
// - The location
|
|
1508
|
-
|
|
1509
|
-
// positives for loading/submissionRedirect when actionData returned
|
|
1510
|
-
// on a prior submission)
|
|
1511
|
-
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;
|
|
1507
|
+
// - The location being loaded is not the result of a redirect
|
|
1508
|
+
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;
|
|
1512
1509
|
let actionData;
|
|
1513
1510
|
|
|
1514
1511
|
if (newState.actionData) {
|
|
@@ -2070,7 +2067,6 @@ function createRouter(init) {
|
|
|
2070
2067
|
fetchers: new Map(state.fetchers)
|
|
2071
2068
|
});
|
|
2072
2069
|
return startRedirectNavigation(state, actionResult, {
|
|
2073
|
-
submission,
|
|
2074
2070
|
isFetchActionRedirect: true
|
|
2075
2071
|
});
|
|
2076
2072
|
} // Process any non-redirect errors thrown
|
|
@@ -2149,9 +2145,7 @@ function createRouter(init) {
|
|
|
2149
2145
|
let redirect = findRedirect(results);
|
|
2150
2146
|
|
|
2151
2147
|
if (redirect) {
|
|
2152
|
-
return startRedirectNavigation(state, redirect
|
|
2153
|
-
submission
|
|
2154
|
-
});
|
|
2148
|
+
return startRedirectNavigation(state, redirect);
|
|
2155
2149
|
} // Process and commit output from loaders
|
|
2156
2150
|
|
|
2157
2151
|
|