Commit 0eb5bab4 authored by Wagner Camarao's avatar Wagner Camarao Committed by Tim Neutkens

Fix a/b typo in custom-server-typescript routing (#4003)

parent eff27bdc
...@@ -3,7 +3,7 @@ import Link from 'next/link' ...@@ -3,7 +3,7 @@ import Link from 'next/link'
export default () => ( export default () => (
<ul> <ul>
<li><Link href='/b' as='/a'><a>a</a></Link></li> <li><Link href='/a' as='/a'><a>a</a></Link></li>
<li><Link href='/a' as='/b'><a>b</a></Link></li> <li><Link href='/b' as='/b'><a>b</a></Link></li>
</ul> </ul>
) )
...@@ -14,9 +14,9 @@ app.prepare() ...@@ -14,9 +14,9 @@ app.prepare()
const { pathname, query } = parsedUrl const { pathname, query } = parsedUrl
if (pathname === '/a') { if (pathname === '/a') {
app.render(req, res, '/b', query)
} else if (pathname === '/b') {
app.render(req, res, '/a', query) app.render(req, res, '/a', query)
} else if (pathname === '/b') {
app.render(req, res, '/b', query)
} else { } else {
handle(req, res, parsedUrl) handle(req, res, parsedUrl)
} }
......
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