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:
parent
5642514aa5
commit
53dfbcc81c
|
@ -65,7 +65,7 @@ SharedShadowNode FabricUIManager::cloneNodeWithNewChildren(const SharedShadowNod
|
||||||
LOG(INFO) << "FabricUIManager::cloneNodeWithNewChildren(shadowNode: " << shadowNode->getDebugDescription(DebugStringConvertibleOptions {.format = false}) << ")";
|
LOG(INFO) << "FabricUIManager::cloneNodeWithNewChildren(shadowNode: " << shadowNode->getDebugDescription(DebugStringConvertibleOptions {.format = false}) << ")";
|
||||||
// Assuming semantic: Cloning with same props but empty children.
|
// Assuming semantic: Cloning with same props but empty children.
|
||||||
ComponentDescriptor &componentDescriptor = *_registry[shadowNode];
|
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});
|
LOG(INFO) << "FabricUIManager::cloneNodeWithNewChildren() -> " << clonnedShadowNode->getDebugDescription(DebugStringConvertibleOptions {.format = false});
|
||||||
return clonnedShadowNode;
|
return clonnedShadowNode;
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,7 @@ SharedShadowNode FabricUIManager::cloneNodeWithNewChildrenAndProps(const SharedS
|
||||||
// Assuming semantic: Cloning with empty children and specified props.
|
// Assuming semantic: Cloning with empty children and specified props.
|
||||||
ComponentDescriptor &componentDescriptor = *_registry[shadowNode];
|
ComponentDescriptor &componentDescriptor = *_registry[shadowNode];
|
||||||
RawProps rawProps = rawPropsFromDynamic(props);
|
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});
|
LOG(INFO) << "FabricUIManager::cloneNodeWithNewChildrenAndProps() -> " << clonnedShadowNode->getDebugDescription(DebugStringConvertibleOptions {.format = false});
|
||||||
return clonnedShadowNode;
|
return clonnedShadowNode;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue