@samitouri / QOS-React-2 / commits / 9c8c11dd07

Set this.props on elements in prod mode

Oops. Introduced in https://github.com/facebook/react/pull/4172.

Ben Alpert committed Jun 24, 2015 at 16:26 UTC 9c8c11dd07f7f1a1549f36c20b065ca667c170f4
1 file changed +2 -1
src/isomorphic/classic/element/ReactElement.js
+2 -1
@@ -40,6 +40,8 @@ var ReactElement = function(type, key, ref, owner, props) {
40 // Record the component responsible for creating this element.
41 this._owner = owner;
42
43 + this.props = props;
44 +
45 if (__DEV__) {
46 // The validation flag is currently mutative. We put it on
47 // an external backing store so that we can freeze the whole object.
@@ -61,7 +63,6 @@ var ReactElement = function(type, key, ref, owner, props) {
63 } catch (x) {
64 this._store.validated = false;
65 }
64 - this.props = props;
66 Object.freeze(this.props);
67 Object.freeze(this);
68 }