Reconciler: Combine identical cases in findParent (#32210)

## Summary

When lookup `Parent`, `HostRoot` and `HostPortal` should be merged,
because when creating a `Portal`, it will also include
`containerInfo`(So we can directly use this `containerInfo` to delete
the real DOM nodes.), so there is no need to handle them separately.

## How did you test this change?

No behavior changes, all existing tests pass.
This commit is contained in:
Wick
2025-01-31 14:35:48 -08:00
committed by GitHub
parent a657bc5dee
commit 19ca800caa
+1 -5
View File
@@ -2007,11 +2007,7 @@ function commitDeletionEffects(
hostParentIsContainer = false;
break findParent;
}
case HostRoot: {
hostParent = parent.stateNode.containerInfo;
hostParentIsContainer = true;
break findParent;
}
case HostRoot:
case HostPortal: {
hostParent = parent.stateNode.containerInfo;
hostParentIsContainer = true;