Removed unnecessary code path in `[RCTUIManager updateView:]`

Summary: The `-[RCTShadowView viewName]` prop must exist, we don't need special handling for this case.

Reviewed By: mmmulani

Differential Revision: D6596375

fbshipit-source-id: 3e99a62bd6296e0285156f03dc2ac93db7f630e5
This commit is contained in:
Valentin Shergin 2017-12-19 23:34:52 -08:00 committed by Facebook Github Bot
parent 7d1dedadd7
commit c79246dbc6
1 changed files with 5 additions and 3 deletions

View File

@ -992,11 +992,13 @@ RCT_EXPORT_METHOD(createView:(nonnull NSNumber *)reactTag
}
RCT_EXPORT_METHOD(updateView:(nonnull NSNumber *)reactTag
viewName:(NSString *)viewName // not always reliable, use shadowView.viewName if available
props:(NSDictionary *)props)
viewName:(__unused NSString *)viewName
props:(NSDictionary *)props)
{
RCTShadowView *shadowView = _shadowViewRegistry[reactTag];
RCTComponentData *componentData = _componentDataByName[shadowView.viewName ?: viewName];
RCTAssert(shadowView != nil, @"Shadow view with tag = %@ not found.", reactTag);
RCTComponentData *componentData = _componentDataByName[shadowView.viewName];
[componentData setProps:props forShadowView:shadowView];
[self addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary<NSNumber *, UIView *> *viewRegistry) {