Skip to content

Commit 0eb5bab

Browse files
Wagner Camaraotimneutkens
Wagner Camarao
authored andcommitted
Fix a/b typo in custom-server-typescript routing (vercel#4003)
1 parent eff27bd commit 0eb5bab

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

examples/custom-server-typescript/pages/index.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Link from 'next/link'
33

44
export default () => (
55
<ul>
6-
<li><Link href='/b' as='/a'><a>a</a></Link></li>
7-
<li><Link href='/a' as='/b'><a>b</a></Link></li>
6+
<li><Link href='/a' as='/a'><a>a</a></Link></li>
7+
<li><Link href='/b' as='/b'><a>b</a></Link></li>
88
</ul>
99
)

examples/custom-server-typescript/server/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ app.prepare()
1414
const { pathname, query } = parsedUrl
1515

1616
if (pathname === '/a') {
17-
app.render(req, res, '/b', query)
18-
} else if (pathname === '/b') {
1917
app.render(req, res, '/a', query)
18+
} else if (pathname === '/b') {
19+
app.render(req, res, '/b', query)
2020
} else {
2121
handle(req, res, parsedUrl)
2222
}

0 commit comments

Comments
 (0)