Commit cbe70e95 authored by Brian Rayburn's avatar Brian Rayburn Committed by Luis Fernando Alvarez D

Update README.md (#8392)

change `||` to `&&` in Router.beforePopState example to match doc description
parent 11517b20
...@@ -777,7 +777,7 @@ import Router from 'next/router' ...@@ -777,7 +777,7 @@ import Router from 'next/router'
Router.beforePopState(({ url, as, options }) => { Router.beforePopState(({ url, as, options }) => {
// I only want to allow these two routes! // I only want to allow these two routes!
if (as !== '/' || as !== '/other') { if (as !== '/' && as !== '/other') {
// Have SSR render bad routes as a 404. // Have SSR render bad routes as a 404.
window.location.href = as window.location.href = as
return false return false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment