mirror of
https://github.com/facebook/react.git
synced 2026-02-26 18:58:05 +00:00
Merge pull request #6223 from lelandrichardson/patch-1
[fix] key/ref warnings incorrectly throw on DOM Elements
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user