Permalink
Browse files

Invalidate layout when node is removed from tree

Reviewed By: astreet

Differential Revision: D4716022

fbshipit-source-id: 399cc64a4b3f5fd3fc469ea37bdd31abe474dc6c
  • Loading branch information...
emilsjolander authored and facebook-github-bot committed Mar 17, 2017
1 parent ce27022 commit e85477552784f599ce7ec9274715affef183a2fa
Showing with 1 addition and 0 deletions.
  1. +1 −0 ReactCommon/yoga/yoga/Yoga.c
@@ -423,6 +423,7 @@ void YGNodeInsertChild(const YGNodeRef node, const YGNodeRef child, const uint32
void YGNodeRemoveChild(const YGNodeRef node, const YGNodeRef child) {
if (YGNodeListDelete(node->children, child) != NULL) {
child->layout = gYGNodeDefaults.layout; // layout is no longer valid
child->parent = NULL;
YGNodeMarkDirtyInternal(node);
}

0 comments on commit e854775

Please sign in to comment.