style: delete unused isHost check (#21203)
wangao committed
Apr 8, 2021 at 20:58 UTC
1a02d2792e470d28dfbd0ea0723ca439856ba197
2 files changed
+4
-4
packages/react-reconciler/src/ReactFiberCommitWork.new.js
+2
-2
@@ -1613,7 +1613,7 @@ function insertOrAppendPlacementNodeIntoContainer(
1613
const {tag} = node;
1614
const isHost = tag === HostComponent || tag === HostText;
1615
if (isHost) {
1616
- const stateNode = isHost ? node.stateNode : node.stateNode.instance;
1616
+ const stateNode = node.stateNode;
1617
if (before) {
1618
insertInContainerBefore(parent, stateNode, before);
1619
} else {
@@ -1644,7 +1644,7 @@ function insertOrAppendPlacementNode(
1644
const {tag} = node;
1645
const isHost = tag === HostComponent || tag === HostText;
1646
if (isHost) {
1647
- const stateNode = isHost ? node.stateNode : node.stateNode.instance;
1647
+ const stateNode = node.stateNode;
1648
if (before) {
1649
insertBefore(parent, stateNode, before);
1650
} else {
packages/react-reconciler/src/ReactFiberCommitWork.old.js
+2
-2
@@ -1613,7 +1613,7 @@ function insertOrAppendPlacementNodeIntoContainer(
1613
const {tag} = node;
1614
const isHost = tag === HostComponent || tag === HostText;
1615
if (isHost) {
1616
- const stateNode = isHost ? node.stateNode : node.stateNode.instance;
1616
+ const stateNode = node.stateNode;
1617
if (before) {
1618
insertInContainerBefore(parent, stateNode, before);
1619
} else {
@@ -1644,7 +1644,7 @@ function insertOrAppendPlacementNode(
1644
const {tag} = node;
1645
const isHost = tag === HostComponent || tag === HostText;
1646
if (isHost) {
1647
- const stateNode = isHost ? node.stateNode : node.stateNode.instance;
1647
+ const stateNode = node.stateNode;
1648
if (before) {
1649
insertBefore(parent, stateNode, before);
1650
} else {