Skip to content

Commit

Permalink
Update onlyChild invariant message (#7514)
Browse files Browse the repository at this point in the history
(cherry picked from commit 921d8c1)
  • Loading branch information
sophiebits authored and zpao committed Aug 19, 2016
1 parent 536f826 commit 9fea8ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/isomorphic/children/onlyChild.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var invariant = require('invariant');
function onlyChild(children) {
invariant(
ReactElement.isValidElement(children),
'onlyChild must be passed a children with exactly one child.'
'React.Children.only expected to receive a single React element child.'
);
return children;
}
Expand Down

0 comments on commit 9fea8ec

Please sign in to comment.