Fabric: Fixed bug in node management in FabricUIManager

Summary: Suddenly, `{}` means `{nullptr}`, not `empty list`.

Reviewed By: mdvacca

Differential Revision: D7376347

fbshipit-source-id: 76f81eebe046ae592f0a42be7bcaa0587732c2a9
This commit is contained in:
Valentin Shergin 2018-03-25 22:43:38 -07:00 committed by Facebook Github Bot
parent 5642514aa5
commit 53dfbcc81c
1 changed files with 2 additions and 2 deletions

View File

@ -65,7 +65,7 @@ SharedShadowNode FabricUIManager::cloneNodeWithNewChildren(const SharedShadowNod
LOG(INFO) << "FabricUIManager::cloneNodeWithNewChildren(shadowNode: " << shadowNode->getDebugDescription(DebugStringConvertibleOptions {.format = false}) << ")";
// Assuming semantic: Cloning with same props but empty children.
ComponentDescriptor &componentDescriptor = *_registry[shadowNode];
SharedShadowNode clonnedShadowNode = componentDescriptor.cloneShadowNode(shadowNode, nullptr, {});
SharedShadowNode clonnedShadowNode = componentDescriptor.cloneShadowNode(shadowNode, nullptr, ShadowNode::emptySharedShadowNodeSharedList());
LOG(INFO) << "FabricUIManager::cloneNodeWithNewChildren() -> " << clonnedShadowNode->getDebugDescription(DebugStringConvertibleOptions {.format = false});
return clonnedShadowNode;
}
@ -85,7 +85,7 @@ SharedShadowNode FabricUIManager::cloneNodeWithNewChildrenAndProps(const SharedS
// Assuming semantic: Cloning with empty children and specified props.
ComponentDescriptor &componentDescriptor = *_registry[shadowNode];
RawProps rawProps = rawPropsFromDynamic(props);
SharedShadowNode clonnedShadowNode = componentDescriptor.cloneShadowNode(shadowNode, std::make_shared<const RawProps>(rawProps), {});
SharedShadowNode clonnedShadowNode = componentDescriptor.cloneShadowNode(shadowNode, std::make_shared<const RawProps>(rawProps), ShadowNode::emptySharedShadowNodeSharedList());
LOG(INFO) << "FabricUIManager::cloneNodeWithNewChildrenAndProps() -> " << clonnedShadowNode->getDebugDescription(DebugStringConvertibleOptions {.format = false});
return clonnedShadowNode;
}