dillon1000/react
Commit
Browse files 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
Changed paths2 files
First-parent comparisonsrc/isomorphic/classic/types/ReactPropTypes.js ModifiedM src/isomorphic/classic/types/__tests__/ReactPropTypes-test.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…