Merge pull request #3327 from Simek/initialize-variables-fix
initialize dev variables in dev mode only in shouldUpdateReactComponent.js
This commit is contained in:
commit
462e8f1be8
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue