Fabric: Fixed getDirtied vs isDirty in YogaLayoutableShadowNode

Summary:
This is quite a fateful mistake. `getDirtied()` returns the pointer to a function which is obviously a mistake here; we should use `isDirty()` instead.

Changelog: [Internal] Fabric-specific internal change.

Reviewed By: mdvacca

Differential Revision: D21028569

fbshipit-source-id: 95212b31f4e32d51c594d5209f295397af3f1252
This commit is contained in:
Valentin Shergin
2020-04-20 19:19:09 -07:00
committed by Facebook GitHub Bot
parent 77012753e5
commit 4afb8362ec
@@ -174,8 +174,8 @@ void YogaLayoutableShadowNode::updateYogaChildren() {
// Optimization:
// If the new list of child nodes consists of clean nodes, and if their styles
// are identical to styles of old children, we don't dirty the node.
bool isClean = !yogaNode_.getDirtied() &&
children.size() == yogaNode_.getChildren().size();
bool isClean =
!yogaNode_.isDirty() && children.size() == yogaNode_.getChildren().size();
auto oldChildren = isClean ? yogaNode_.getChildren() : YGVector{};
yogaNode_.setChildren({});