Update onlyChild invariant message (#7514)
Ben Alpert committed
Aug 17, 2016 at 13:03 UTC
921d8c151ba8114a2314f32cd453d8954aeb19fc
1 file changed
+1
-1
src/isomorphic/children/onlyChild.js
+1
-1
@@ -31,7 +31,7 @@ var invariant = require('invariant');
31
function onlyChild(children) {
32
invariant(
33
ReactElement.isValidElement(children),
34
- 'onlyChild must be passed a children with exactly one child.'
34
+ 'React.Children.only expected to receive a single React element child.'
35
);
36
return children;
37
}