dillon1000/react

Commit

Fix for #5468: Validate PropTypes.oneOf(Type) arguments early (#6316)

* Fix for 5468: Validate proptype definitions sooner

Added typeCheckWarn() func and updated the oneOf/oneOfType tests
Added __DEV__ warning for invalid oneOf/OneOfType args

* Suppress redundant error on warn; typeCheckWarn() removed

* Return no-op

* Using emptyFunction module for consistency

* Remove createChainableTypeChecker() call

* Adjust test to assert type check passes when warned
Browse files
Changed paths2 files
First-parent comparison
M src/isomorphic/classic/types/ReactPropTypes.js ModifiedM src/isomorphic/classic/types/__tests__/ReactPropTypes-test.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…