Files
JJ KasperandGitHub 489cad36bc Fix href resolving with trailing slash enabled (#16873)
This makes sure to strip the trailing slash before attempting to resolve the `href` against pages/dynamic routes and adds tests ensuring the correct pages are resolved with `trailingSlash: true` enabled.

Fixes: https://github.com/vercel/next.js/issues/16872
2020-09-06 02:36:57 +00:00

12 lines
205 B
JavaScript

import { useRouter } from 'next/router'
export default function Page() {
const router = useRouter()
return (
<>
<p id="slug">catch-all slug {router.query.slug?.join('/')}</p>
</>
)
}