Merge pull request #6223 from lelandrichardson/patch-1

[fix] key/ref warnings incorrectly throw on DOM Elements
This commit is contained in:
Ben Alpert
2016-03-08 20:43:08 -08:00

View File

@@ -184,7 +184,7 @@ ReactElement.createElement = function(type, config, children) {
'in `undefined` being returned. If you need to access the same ' +
'value within the child component, you should pass it as a different ' +
'prop. (https://fb.me/react-special-props)',
'displayName' in type ? type.displayName: 'Element'
typeof type === 'function' && 'displayName' in type ? type.displayName : 'Element'
);
}
return undefined;
@@ -203,7 +203,7 @@ ReactElement.createElement = function(type, config, children) {
'in `undefined` being returned. If you need to access the same ' +
'value within the child component, you should pass it as a different ' +
'prop. (https://fb.me/react-special-props)',
'displayName' in type ? type.displayName: 'Element'
typeof type === 'function' && 'displayName' in type ? type.displayName : 'Element'
);
}
return undefined;