Skip to content

Commit 6ffc93d

Browse files
sherginfacebook-github-bot
authored andcommitted
Fabric: Use ShadowNode::sameFamily instead of getTag() to check for same family
Summary: We used to use `getTag` to check that some two nodes are clones of each other, not we have a dedicated method for that that exactly ensures that without reling on a sideeffect (wich tag equality is). That is just much less error-prone. Changelog: [Internal] Fabric-specific internal change. Reviewed By: mdvacca Differential Revision: D18231006 fbshipit-source-id: 6b247ed0eaded1fed8fd7fa820e80cd58602110c
1 parent c5980a4 commit 6ffc93d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ReactCommon/fabric/mounting/ShadowTree.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ static void updateMountedFlag(
5959
continue;
6060
}
6161

62-
if (oldChild->getTag() != newChild->getTag()) {
62+
if (!ShadowNode::sameFamily(*oldChild, *newChild)) {
6363
// Totally different nodes, updating is impossible.
6464
break;
6565
}

0 commit comments

Comments
 (0)