mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Fix a/b typo in custom-server-typescript routing (#4003)
This commit is contained in:
parent
eff27bdcfb
commit
0eb5bab452
|
@ -3,7 +3,7 @@ import Link from 'next/link'
|
|||
|
||||
export default () => (
|
||||
<ul>
|
||||
<li><Link href='/b' as='/a'><a>a</a></Link></li>
|
||||
<li><Link href='/a' as='/b'><a>b</a></Link></li>
|
||||
<li><Link href='/a' as='/a'><a>a</a></Link></li>
|
||||
<li><Link href='/b' as='/b'><a>b</a></Link></li>
|
||||
</ul>
|
||||
)
|
||||
|
|
|
@ -14,9 +14,9 @@ app.prepare()
|
|||
const { pathname, query } = parsedUrl
|
||||
|
||||
if (pathname === '/a') {
|
||||
app.render(req, res, '/b', query)
|
||||
} else if (pathname === '/b') {
|
||||
app.render(req, res, '/a', query)
|
||||
} else if (pathname === '/b') {
|
||||
app.render(req, res, '/b', query)
|
||||
} else {
|
||||
handle(req, res, parsedUrl)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue