mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-28 20:25:33 +08:00
Fabric: Using a proper Component Descriptor for node cloning
Summary: To clone a ShadowNode we must use node's ComponentDescriptot, not parent node's one. Reviewed By: mdvacca Differential Revision: D7738583 fbshipit-source-id: 83656f9a761530cdaedf65663ae28b3119af75f5
This commit is contained in:
committed by
Facebook Github Bot
parent
3428808b97
commit
6aa52f2684
@@ -81,6 +81,7 @@ private:
|
||||
ShadowNodeCloneFunction getCloneFunction() const {
|
||||
if (!cloneFunction_) {
|
||||
cloneFunction_ = [this](const SharedShadowNode &shadowNode, const SharedProps &props, const SharedShadowNodeSharedList &children) {
|
||||
assert(std::dynamic_pointer_cast<const ShadowNodeT>(shadowNode));
|
||||
return this->cloneShadowNode(shadowNode, props, children);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user