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 коммит произвёл facebook-github-bot-7
Родитель d1dbe2dfa6
Коммит ecf6981093
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -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(