From 4afb8362ec7f65fa315e44343ca878203ecfcfe1 Mon Sep 17 00:00:00 2001 From: Valentin Shergin Date: Mon, 20 Apr 2020 19:19:09 -0700 Subject: [PATCH] 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 --- .../fabric/components/view/yoga/YogaLayoutableShadowNode.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReactCommon/fabric/components/view/yoga/YogaLayoutableShadowNode.cpp b/ReactCommon/fabric/components/view/yoga/YogaLayoutableShadowNode.cpp index b1a23d06eb2..25baf6871f3 100644 --- a/ReactCommon/fabric/components/view/yoga/YogaLayoutableShadowNode.cpp +++ b/ReactCommon/fabric/components/view/yoga/YogaLayoutableShadowNode.cpp @@ -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({});