Skip to content

Commit

Permalink
update error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
chicoxyzzy committed Nov 5, 2015
1 parent 7ae6791 commit a86d25d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/isomorphic/classic/types/ReactPropTypes.js
Expand Up @@ -146,7 +146,7 @@ function createArrayOfTypeChecker(typeChecker) {
function validate(props, propName, componentName, location, propFullName) {
if (typeof typeChecker !== 'function') {
return new Error(
`Invalid argument \`${propFullName}\` supplied to \`${componentName}\`, expected valid PropType.`
`Property \`${propFullName}\` of component \`${componentName}\` has invalid PropType notation inside arrayOf.`
);
}
var propValue = props[propName];
Expand Down Expand Up @@ -237,7 +237,7 @@ function createObjectOfTypeChecker(typeChecker) {
function validate(props, propName, componentName, location, propFullName) {
if (typeof typeChecker !== 'function') {
return new Error(
`Invalid argument \`${propFullName}\` supplied to \`${componentName}\`, expected valid PropType.`
`Property \`${propFullName}\` of component \`${componentName}\` has invalid PropType notation inside objectOf.`
);
}
var propValue = props[propName];
Expand Down
4 changes: 2 additions & 2 deletions src/isomorphic/classic/types/__tests__/ReactPropTypes-test.js
Expand Up @@ -142,7 +142,7 @@ describe('ReactPropTypes', function() {
typeCheckFail(
PropTypes.arrayOf({ foo: PropTypes.string }),
{ foo: 'bar' },
'Invalid argument `testProp` supplied to `testComponent`, expected valid PropType.'
'Property `testProp` of component `testComponent` has invalid PropType notation inside arrayOf.'
);
});

Expand Down Expand Up @@ -473,7 +473,7 @@ describe('ReactPropTypes', function() {
typeCheckFail(
PropTypes.objectOf({ foo: PropTypes.string }),
{ foo: 'bar' },
'Invalid argument `testProp` supplied to `testComponent`, expected valid PropType.'
'Property `testProp` of component `testComponent` has invalid PropType notation inside objectOf.'
);
});

Expand Down

0 comments on commit a86d25d

Please sign in to comment.