1
0
Fork 0
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:
Wagner Camarao 2018-03-14 05:06:53 -03:00 committed by Tim Neutkens
parent eff27bdcfb
commit 0eb5bab452
2 changed files with 4 additions and 4 deletions

View file

@ -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>
)

View file

@ -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)
}