Replace hasOwnProperty in child processing with typeof undefined check

This commit is contained in:
Michael Ridgway committed 2015-04-13 14:17:16 -07:00
1 parent 6d868a2705
commit 5a431a12ac
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -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,
+1 -1
View File
@@ -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,