Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Jun 12, 2022
1 parent e0a53e5 commit 0d498c2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/typescript-to-proptypes/src/injector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,8 @@ function plugin(
// key is a reserved prop name in React
// e.g. https://github.com/reactjs/rfcs/pull/107
// no need to add a prop-type if we won't generate the docs for it.
if (data.prop.name === 'key') {
if (data.prop.jsDoc === '@ignore') {
return false;
}
if (data.prop.name === 'key' && data.prop.jsDoc === '@ignore') {
return false;
}

if (options.shouldInclude) {
Expand Down

0 comments on commit 0d498c2

Please sign in to comment.