Skip to content

Commit

Permalink
style: delete unused isHost check (facebook#21203)
Browse files Browse the repository at this point in the history
  • Loading branch information
wangao authored and koto committed Jun 15, 2021
1 parent bfd198f commit b9383f8
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 b9383f8

Please sign in to comment.