@samitouri / QOS-React-2 / commits / a42dcf4f7b

initialize dev variables in dev mode only

Bartosz Kaszubowski committed Mar 5, 2015 at 21:20 UTC a42dcf4f7b10eab60bc97d89719eca05731dda35
1 file changed +3 -3
src/core/shouldUpdateReactComponent.js
+3 -3
@@ -36,11 +36,11 @@ function shouldUpdateReactComponent(prevElement, nextElement) {
36 prevElement.type === nextElement.type &&
37 prevElement.key === nextElement.key) {
38 var ownersMatch = prevElement._owner === nextElement._owner;
39 - var prevName = null;
40 - var nextName = null;
41 - var nextDisplayName = null;
39 if (__DEV__) {
40 if (!ownersMatch) {
41 + var prevName = null;
42 + var nextName = null;
43 + var nextDisplayName = null;
44 if (prevElement._owner != null &&
45 prevElement._owner.getPublicInstance() != null &&
46 prevElement._owner.getPublicInstance().constructor != null) {