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 acdlite committed Apr 19, 2021
1 parent 0a4ee8e commit 2f4913b
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 2f4913b

Please sign in to comment.