mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Merge pull request #4215 from spicyj/prod-props
Set this.props on elements in prod mode
This commit is contained in:
@@ -40,6 +40,8 @@ var ReactElement = function(type, key, ref, owner, props) {
|
||||
// Record the component responsible for creating this element.
|
||||
this._owner = owner;
|
||||
|
||||
this.props = props;
|
||||
|
||||
if (__DEV__) {
|
||||
// The validation flag is currently mutative. We put it on
|
||||
// an external backing store so that we can freeze the whole object.
|
||||
@@ -61,7 +63,6 @@ var ReactElement = function(type, key, ref, owner, props) {
|
||||
} catch (x) {
|
||||
this._store.validated = false;
|
||||
}
|
||||
this.props = props;
|
||||
Object.freeze(this.props);
|
||||
Object.freeze(this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user