Merge pull request #3665 from mridgway/replaceHasOwnProperty

[performance] Replace hasOwnProperty in child processing with typeof undefined check
This commit is contained in:
Ben Alpert 2015-04-22 11:21:38 -07:00
commit 3c66b8f0f7
2 changed files with 2 additions and 2 deletions

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 = (mapResult[name] === undefined);
if (__DEV__) {
warning(
keyUnique,

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 = (result[name] === undefined);
if (__DEV__) {
warning(
keyUnique,