Only freeze valid attributes in mountComponent

Reviewed By: spicyj

Differential Revision: D2939910

fb-gh-sync-id: 2efe6ecd6d888d4185a8cc74ba9adbe7c68bcd3b
shipit-source-id: 2efe6ecd6d888d4185a8cc74ba9adbe7c68bcd3b
This commit is contained in:
Matthew Dapena-Tretter 2016-02-16 13:57:30 -08:00 committed by facebook-github-bot-7
parent d1dbe2dfa6
commit ecf6981093

View File

@ -185,7 +185,11 @@ ReactNativeBaseComponent.Mixin = {
var tag = ReactNativeTagHandles.allocateTag();
if (__DEV__) {
deepFreezeAndThrowOnMutationInDev(this._currentElement.props);
for (var key in this.viewConfig.validAttributes) {
if (this._currentElement.props.hasOwnProperty(key)) {
deepFreezeAndThrowOnMutationInDev(this._currentElement.props[key]);
}
}
}
var updatePayload = ReactNativeAttributePayload.create(