Skip to content

Commit

Permalink
Fix useBlocker to return IDLE_BLOCKER during SSR (#10046)
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 authored Feb 10, 2023
1 parent 918b158 commit 259d961
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/long-jokes-wait.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-router-dom": patch
---

Fix useBlocker to return IDLE_BLOCKER during SSR
3 changes: 2 additions & 1 deletion packages/react-router-dom/server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import type {
StaticHandlerContext,
} from "@remix-run/router";
import {
IDLE_BLOCKER,
IDLE_FETCHER,
IDLE_NAVIGATION,
Action,
Expand Down Expand Up @@ -299,7 +300,7 @@ export function createStaticRouter(
throw msg("dispose");
},
getBlocker() {
throw msg("getBlocker");
return IDLE_BLOCKER;
},
deleteBlocker() {
throw msg("deleteBlocker");
Expand Down

0 comments on commit 259d961

Please sign in to comment.