Skip to content

Commit

Permalink
style: delete unused isHost check (#21203)
Browse files Browse the repository at this point in the history
  • Loading branch information
wangao authored Apr 8, 2021
1 parent 782f689 commit 1a02d27
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/react-reconciler/src/ReactFiberCommitWork.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -1613,7 +1613,7 @@ function insertOrAppendPlacementNodeIntoContainer(
const {tag} = node;
const isHost = tag === HostComponent || tag === HostText;
if (isHost) {
const stateNode = isHost ? node.stateNode : node.stateNode.instance;
const stateNode = node.stateNode;
if (before) {
insertInContainerBefore(parent, stateNode, before);
} else {
Expand Down Expand Up @@ -1644,7 +1644,7 @@ function insertOrAppendPlacementNode(
const {tag} = node;
const isHost = tag === HostComponent || tag === HostText;
if (isHost) {
const stateNode = isHost ? node.stateNode : node.stateNode.instance;
const stateNode = node.stateNode;
if (before) {
insertBefore(parent, stateNode, before);
} else {
Expand Down
4 changes: 2 additions & 2 deletions packages/react-reconciler/src/ReactFiberCommitWork.old.js
Original file line number Diff line number Diff line change
Expand Up @@ -1613,7 +1613,7 @@ function insertOrAppendPlacementNodeIntoContainer(
const {tag} = node;
const isHost = tag === HostComponent || tag === HostText;
if (isHost) {
const stateNode = isHost ? node.stateNode : node.stateNode.instance;
const stateNode = node.stateNode;
if (before) {
insertInContainerBefore(parent, stateNode, before);
} else {
Expand Down Expand Up @@ -1644,7 +1644,7 @@ function insertOrAppendPlacementNode(
const {tag} = node;
const isHost = tag === HostComponent || tag === HostText;
if (isHost) {
const stateNode = isHost ? node.stateNode : node.stateNode.instance;
const stateNode = node.stateNode;
if (before) {
insertBefore(parent, stateNode, before);
} else {
Expand Down

0 comments on commit 1a02d27

Please sign in to comment.