Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set this.props on elements in prod mode #4215

Merged
merged 1 commit into from
Jun 24, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Set this.props on elements in prod mode
Oops. Introduced in #4172.
  • Loading branch information
sophiebits committed Jun 24, 2015
commit 9c8c11dd07f7f1a1549f36c20b065ca667c170f4
3 changes: 2 additions & 1 deletion src/isomorphic/classic/element/ReactElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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);
}
Expand Down