提交 cbe70e95 编写于 作者: B Brian Rayburn 提交者: Luis Fernando Alvarez D

Update README.md (#8392)

change `||` to `&&` in Router.beforePopState example to match doc description
上级 11517b20
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册