Skip to content

Commit 12949e3

Browse files
committed
Make type property required in elementOfType
1 parent 75825b5 commit 12949e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/utils/prop-types.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ import PropTypes from 'prop-types';
1010
export function elementOfType(Component) {
1111
// Not very intuitive, but this is the best way to check with PropTypes (see https://github.com/facebook/react/issues/2979)
1212
return PropTypes.shape({
13-
type: PropTypes.oneOf([Component]),
13+
type: PropTypes.oneOf([Component]).isRequired,
1414
});
1515
}

0 commit comments

Comments
 (0)