Skip to content

Commit

Permalink
Removed unnecessary code path in [RCTUIManager updateView:]
Browse files Browse the repository at this point in the history
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
  • Loading branch information
shergin authored and facebook-github-bot committed Dec 20, 2017
1 parent 7d1deda commit c79246d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions React/Modules/RCTUIManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -992,11 +992,13 @@ - (void)_manageChildren:(NSNumber *)containerTag
}

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) {
Expand Down

0 comments on commit c79246d

Please sign in to comment.