dillon1000/react

Commit

Make PropType.object pass for Date and RegExp instances

8855d6153e252c735de0e6cc373787d22c1a467b gave more accurate error messages for date and regexp by returning 'date' and 'regexp' respectively from `getPropType`.
However, for the object primitive check, which compares the instance passed with `getPropType's` return string, `object` !== 'date'.
This adds special hanlding for those.
Browse files
Changed paths2 files
First-parent comparison
M src/core/ReactPropTypes.js ModifiedM src/core/__tests__/ReactPropTypes-test.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…