Merge pull request #3327 from Simek/initialize-variables-fix

initialize dev variables in dev mode only in shouldUpdateReactComponent.js
This commit is contained in:
Ben Alpert 2015-03-10 15:33:29 -07:00
commit 462e8f1be8
1 changed files with 3 additions and 3 deletions

View File

@ -36,11 +36,11 @@ function shouldUpdateReactComponent(prevElement, nextElement) {
prevElement.type === nextElement.type &&
prevElement.key === nextElement.key) {
var ownersMatch = prevElement._owner === nextElement._owner;
var prevName = null;
var nextName = null;
var nextDisplayName = null;
if (__DEV__) {
if (!ownersMatch) {
var prevName = null;
var nextName = null;
var nextDisplayName = null;
if (prevElement._owner != null &&
prevElement._owner.getPublicInstance() != null &&
prevElement._owner.getPublicInstance().constructor != null) {