Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/renderers/shared/shared/ReactTreeTraversal.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function getLowestCommonAncestor(instA, instB) {
// Walk in lockstep until we find a match.
var depth = depthA;
while (depth--) {
if (instA === instB) {
if (instA === instB || instA === instB.alternate) {
return instA;
}
instA = getParent(instA);
Expand All @@ -76,7 +76,7 @@ function getLowestCommonAncestor(instA, instB) {
*/
function isAncestor(instA, instB) {
while (instB) {
if (instB === instA) {
if (instA === instB || instA === instB.alternate) {
return true;
}
instB = getParent(instB);
Expand Down