Skip to content

Commit

Permalink
[fix] key/ref warnings incorrectly throw on DOM Elements
Browse files Browse the repository at this point in the history
  • Loading branch information
lelandrichardson committed Mar 9, 2016
1 parent 11b5523 commit f938299
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/isomorphic/classic/element/ReactElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit f938299

Please sign in to comment.