Skip to content

Commit

Permalink
Update README.md (#8392)
Browse files Browse the repository at this point in the history
change `||` to `&&` in Router.beforePopState example to match doc description
  • Loading branch information
bgrayburn authored and Luis Fernando Alvarez D committed Aug 16, 2019
1 parent 11517b2 commit cbe70e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ import Router from 'next/router'

Router.beforePopState(({ url, as, options }) => {
// I only want to allow these two routes!
if (as !== '/' || as !== '/other') {
if (as !== '/' && as !== '/other') {
// Have SSR render bad routes as a 404.
window.location.href = as
return false
Expand Down

0 comments on commit cbe70e9

Please sign in to comment.