Revert D6596375: [RN] Removed unnecessary code path in `[RCTUIManager updateView:]`

Differential Revision: D6596375

fbshipit-source-id: f8b0ea2dafbf997a18e9c86fb279682d31b06d0e
This commit is contained in:
Valentin Shergin 2017-12-20 17:34:37 -08:00 committed by Facebook Github Bot
parent 4216cdef13
commit fc5e340e89
1 changed files with 3 additions and 5 deletions

View File

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