diff --git a/src/classic/element/ReactElementValidator.js b/src/classic/element/ReactElementValidator.js index 36ba7bfd09..db101b7c86 100644 --- a/src/classic/element/ReactElementValidator.js +++ b/src/classic/element/ReactElementValidator.js @@ -194,7 +194,10 @@ function validateChildKeys(node, parentType) { validateChildKeys(child, parentType); } } - } else if (ReactElement.isValidElement(node)) { + } else if ( + typeof node === 'string' || typeof node === 'number' || + ReactElement.isValidElement(node) + ) { // This element was passed in a valid location. return; } else if (node) { diff --git a/src/classic/element/__tests__/ReactElementValidator-test.js b/src/classic/element/__tests__/ReactElementValidator-test.js index 01b1a1b240..5d5b0bed96 100644 --- a/src/classic/element/__tests__/ReactElementValidator-test.js +++ b/src/classic/element/__tests__/ReactElementValidator-test.js @@ -173,7 +173,6 @@ describe('ReactElementValidator', function() { it('does not warn for keys when passing children down', function() { spyOn(console, 'error'); - debugger; var Wrapper = React.createClass({ render: function() { return (