Skip to content

Commit

Permalink
Fix dynamicParams check in TS plugin (#52211)
Browse files Browse the repository at this point in the history
Add the missing `isValid` check.

Fix NEXT-1214, fix #49489.
  • Loading branch information
shuding committed Jul 8, 2023
1 parent af46749 commit ca132f6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/next/src/server/typescript/rules/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ const API_DOCS: Record<
'Disallow rendering dynamic params that are not generated by `generateStaticParams`.',
},
link: 'https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#dynamicparams',
isValid: (value: string) => {
return value === 'true' || value === 'false'
},
},
runtime: {
description:
Expand Down

0 comments on commit ca132f6

Please sign in to comment.