diff --git a/src/isomorphic/classic/types/ReactPropTypes.js b/src/isomorphic/classic/types/ReactPropTypes.js index 6a96fe7ca2b2f..4016a206bc64c 100644 --- a/src/isomorphic/classic/types/ReactPropTypes.js +++ b/src/isomorphic/classic/types/ReactPropTypes.js @@ -146,8 +146,7 @@ function createArrayOfTypeChecker(typeChecker) { function validate(props, propName, componentName, location, propFullName) { if (typeof typeChecker !== 'function') { return new Error( - `Invalid argument \`${propFullName}\` of type ` + - `\`${typeof typeChecker}\` supplied to \`${componentName}\`, expected valid PropType.` + `Invalid argument \`${propFullName}\` supplied to \`${componentName}\`, expected valid PropType.` ); } var propValue = props[propName]; @@ -238,8 +237,7 @@ function createObjectOfTypeChecker(typeChecker) { function validate(props, propName, componentName, location, propFullName) { if (typeof typeChecker !== 'function') { return new Error( - `Invalid argument \`${propFullName}\` of type ` + - `\`${typeof typeChecker}\` supplied to \`${componentName}\`, expected valid PropType.` + `Invalid argument \`${propFullName}\` supplied to \`${componentName}\`, expected valid PropType.` ); } var propValue = props[propName]; diff --git a/src/isomorphic/classic/types/__tests__/ReactPropTypes-test.js b/src/isomorphic/classic/types/__tests__/ReactPropTypes-test.js index 6ae4c93d83aac..1b6512c16892c 100644 --- a/src/isomorphic/classic/types/__tests__/ReactPropTypes-test.js +++ b/src/isomorphic/classic/types/__tests__/ReactPropTypes-test.js @@ -142,7 +142,7 @@ describe('ReactPropTypes', function() { typeCheckFail( PropTypes.arrayOf({ foo: PropTypes.string }), { foo: 'bar' }, - 'Invalid argument `testProp` of type `object` supplied to `testComponent`, expected valid PropType.' + 'Invalid argument `testProp` supplied to `testComponent`, expected valid PropType.' ); }); @@ -473,7 +473,7 @@ describe('ReactPropTypes', function() { typeCheckFail( PropTypes.objectOf({ foo: PropTypes.string }), { foo: 'bar' }, - 'Invalid argument `testProp` of type `object` supplied to `testComponent`, expected valid PropType.' + 'Invalid argument `testProp` supplied to `testComponent`, expected valid PropType.' ); });