mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
Replace hasOwnProperty in child processing with typeof undefined check
This commit is contained in:
1 parent
6d868a2705
commit
5a431a12ac
2 files changed
+2
-2
No files matched your search
@@ -81,7 +81,7 @@ function mapSingleChildIntoContext(traverseContext, child, name, i) {
|
||||
var mapBookKeeping = traverseContext;
|
||||
var mapResult = mapBookKeeping.mapResult;
|
||||
|
||||
var keyUnique = !mapResult.hasOwnProperty(name);
|
||||
var keyUnique = ('undefined' === typeof mapResult[name]);
|
||||
if (__DEV__) {
|
||||
warning(
|
||||
keyUnique,
|
||||
|
||||
@@ -22,7 +22,7 @@ var warning = require('warning');
|
||||
function flattenSingleChildIntoContext(traverseContext, child, name) {
|
||||
// We found a component instance.
|
||||
var result = traverseContext;
|
||||
var keyUnique = !result.hasOwnProperty(name);
|
||||
var keyUnique = ('undefined' === typeof result[name]);
|
||||
if (__DEV__) {
|
||||
warning(
|
||||
keyUnique,
|
||||
|
||||
Reference in new issue
Block a user