Fabric: Removing an assert in YogaLayoutableShadowNode

Summary: Conceptually, this assert is correct, however, sometimes a new node got allocated by same address as old parent node (which does not exist already) which makes the assert fires.

Reviewed By: mdvacca

Differential Revision: D14533070

fbshipit-source-id: 3fcc71c25e7d724180dc85aaf2457227d22ddba0
This commit is contained in:
Valentin Shergin 2019-03-20 18:05:07 -07:00 коммит произвёл Facebook Github Bot
Родитель 95b05c0d82
Коммит 9ede538b75
1 изменённых файлов: 0 добавлений и 3 удалений

Просмотреть файл

@ -80,9 +80,6 @@ void YogaLayoutableShadowNode::appendChild(YogaLayoutableShadowNode *child) {
auto yogaNodeRawPtr = &yogaNode_;
auto childYogaNodeRawPtr = &child->yogaNode_;
// Cloned node must not be reinserted to the same parent.
assert(childYogaNodeRawPtr->getOwner() != yogaNodeRawPtr);
if (childYogaNodeRawPtr->getOwner() != nullptr) {
child = static_cast<YogaLayoutableShadowNode *>(
cloneAndReplaceChild(child, yogaNode_.getChildren().size()));