Skip to content

Commit e854775

Browse files
Emil Sjolanderfacebook-github-bot
Emil Sjolander
authored andcommitted
Invalidate layout when node is removed from tree
Reviewed By: astreet Differential Revision: D4716022 fbshipit-source-id: 399cc64a4b3f5fd3fc469ea37bdd31abe474dc6c
1 parent ce27022 commit e854775

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ReactCommon/yoga/yoga/Yoga.c

+1
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ void YGNodeInsertChild(const YGNodeRef node, const YGNodeRef child, const uint32
423423

424424
void YGNodeRemoveChild(const YGNodeRef node, const YGNodeRef child) {
425425
if (YGNodeListDelete(node->children, child) != NULL) {
426+
child->layout = gYGNodeDefaults.layout; // layout is no longer valid
426427
child->parent = NULL;
427428
YGNodeMarkDirtyInternal(node);
428429
}

0 commit comments

Comments
 (0)