mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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:
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({});
|
||||
|
||||
Reference in New Issue
Block a user