Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/swift-bottles-cheat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@remix-run/router": patch
---

Fix fetcher shouldRevalidate
5 changes: 0 additions & 5 deletions packages/router/__tests__/router-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2068,15 +2068,10 @@ describe("a router", () => {
"currentParams": Object {},
"currentUrl": "http://localhost/",
"defaultShouldRevalidate": true,
"formAction": "/fetch",
"formData": FormData {},
"formEncType": "application/x-www-form-urlencoded",
"formMethod": "post",
"nextParams": Object {},
"nextUrl": "http://localhost/",
}
`);
expect(Object.fromEntries(arg.formData)).toEqual({ key: "value" });

router.dispose();
});
Expand Down
3 changes: 1 addition & 2 deletions packages/router/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1416,7 +1416,6 @@ export function createRouter(init: RouterInit): Router {
updateState({ fetchers: new Map(state.fetchers) });

return startRedirectNavigation(state, actionResult, {
submission,
isFetchActionRedirect: true,
});
}
Expand Down Expand Up @@ -1512,7 +1511,7 @@ export function createRouter(init: RouterInit): Router {

let redirect = findRedirect(results);
if (redirect) {
return startRedirectNavigation(state, redirect, { submission });
return startRedirectNavigation(state, redirect);
}

// Process and commit output from loaders
Expand Down