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:
Родитель
d1dbe2dfa6
Коммит
ecf6981093
|
@ -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(
|
||||
|
|
Загрузка…
Ссылка в новой задаче