@samitouri / QOS-React-2 / commits / a86d25d584

update error messages

chico committed Nov 5, 2015 at 05:45 UTC a86d25d584d085aef7d70bec2779accd12fd7db9
2 files changed +4 -4
src/isomorphic/classic/types/ReactPropTypes.js
+2 -2
@@ -146,7 +146,7 @@ function createArrayOfTypeChecker(typeChecker) {
146 function validate(props, propName, componentName, location, propFullName) {
147 if (typeof typeChecker !== 'function') {
148 return new Error(
149 - `Invalid argument \`${propFullName}\` supplied to \`${componentName}\`, expected valid PropType.`
149 + `Property \`${propFullName}\` of component \`${componentName}\` has invalid PropType notation inside arrayOf.`
150 );
151 }
152 var propValue = props[propName];
@@ -237,7 +237,7 @@ function createObjectOfTypeChecker(typeChecker) {
237 function validate(props, propName, componentName, location, propFullName) {
238 if (typeof typeChecker !== 'function') {
239 return new Error(
240 - `Invalid argument \`${propFullName}\` supplied to \`${componentName}\`, expected valid PropType.`
240 + `Property \`${propFullName}\` of component \`${componentName}\` has invalid PropType notation inside objectOf.`
241 );
242 }
243 var propValue = props[propName];
src/isomorphic/classic/types/__tests__/ReactPropTypes-test.js
+2 -2
@@ -142,7 +142,7 @@ describe('ReactPropTypes', function() {
142 typeCheckFail(
143 PropTypes.arrayOf({ foo: PropTypes.string }),
144 { foo: 'bar' },
145 - 'Invalid argument `testProp` supplied to `testComponent`, expected valid PropType.'
145 + 'Property `testProp` of component `testComponent` has invalid PropType notation inside arrayOf.'
146 );
147 });
148
@@ -473,7 +473,7 @@ describe('ReactPropTypes', function() {
473 typeCheckFail(
474 PropTypes.objectOf({ foo: PropTypes.string }),
475 { foo: 'bar' },
476 - 'Invalid argument `testProp` supplied to `testComponent`, expected valid PropType.'
476 + 'Property `testProp` of component `testComponent` has invalid PropType notation inside objectOf.'
477 );
478 });
479