Skip to content

Commit abf222b

Browse files
brophdawg11timdorr
andauthored
Update popstate warning when popping to an unknown location (#9941)
* Update popstate warning when popping to an unknown location * stay under bundle limit Co-authored-by: Tim Dorr <[email protected]>
1 parent 72f8ef1 commit abf222b

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

packages/router/history.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -625,14 +625,10 @@ function getUrlBasedHistory(
625625
} else {
626626
warning(
627627
false,
628-
// TODO: Write up a doc that explains our blocking strategy in detail
629-
// and link to it here so people can understand better what is going on
630-
// and how to avoid it.
631-
`You are trying to block a POP navigation to a location that was not ` +
632-
`created by @remix-run/router. The block will fail silently in ` +
633-
`production, but in general you should do all navigation with the ` +
634-
`router (instead of using window.history.pushState directly) ` +
635-
`to avoid this situation.`
628+
`You are trying to perform a POP navigation to a location that was not ` +
629+
`created by @remix-run/router. This will fail silently in production. ` +
630+
`You should navigate via the router to avoid this situation (instead of ` +
631+
`using window.history.pushState/window.location.hash).`
636632
);
637633
}
638634
}

0 commit comments

Comments
 (0)