From 53dfbcc81c6d8623c7e9d9febf67416c6cdd2cdf Mon Sep 17 00:00:00 2001 From: Valentin Shergin Date: Sun, 25 Mar 2018 22:43:38 -0700 Subject: [PATCH] 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 --- ReactCommon/fabric/uimanager/FabricUIManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReactCommon/fabric/uimanager/FabricUIManager.cpp b/ReactCommon/fabric/uimanager/FabricUIManager.cpp index 997a5a91b9b..0da19722a25 100644 --- a/ReactCommon/fabric/uimanager/FabricUIManager.cpp +++ b/ReactCommon/fabric/uimanager/FabricUIManager.cpp @@ -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(rawProps), {}); + SharedShadowNode clonnedShadowNode = componentDescriptor.cloneShadowNode(shadowNode, std::make_shared(rawProps), ShadowNode::emptySharedShadowNodeSharedList()); LOG(INFO) << "FabricUIManager::cloneNodeWithNewChildrenAndProps() -> " << clonnedShadowNode->getDebugDescription(DebugStringConvertibleOptions {.format = false}); return clonnedShadowNode; }