Skip to content

Commit cbe70e9

Browse files
bgrayburnLuis Fernando Alvarez D
authored andcommitted
Update README.md (#8392)
change `||` to `&&` in Router.beforePopState example to match doc description
1 parent 11517b2 commit cbe70e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/next/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ import Router from 'next/router'
777777

778778
Router.beforePopState(({ url, as, options }) => {
779779
// I only want to allow these two routes!
780-
if (as !== '/' || as !== '/other') {
780+
if (as !== '/' && as !== '/other') {
781781
// Have SSR render bad routes as a 404.
782782
window.location.href = as
783783
return false

0 commit comments

Comments
 (0)