Skip to content

Commit

Permalink
Fix default warning message to not include text that React adds anyway.
Browse files Browse the repository at this point in the history
React automatically adds Warning: Failed propType to error message, so
no need to append ourselves.
  • Loading branch information
beefancohen committed Feb 11, 2016
1 parent bdc139b commit 1a8eda1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion isRequiredIf.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const missingPropError = (props, propName, componentName, message) => {
}

return new Error(
`Warning: Failed propType: Required ${props[propName]} \`${propName}\`` +
`Required ${props[propName]} \`${propName}\`` +
` was not specified in \`${componentName}\`.`
);
};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-proptype-conditional-require",
"version": "1.0.1",
"version": "1.0.2",
"description": "Conditionally require a React proptype based on other props and/or other conditions.",
"main": "dist/react-proptype-conditional-require.js",
"scripts": {
Expand Down

0 comments on commit 1a8eda1

Please sign in to comment.