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 11, 2021
1 parent 8e3dd8f commit ca6f35c
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 ca6f35c

Please sign in to comment.