From 1a02d2792e470d28dfbd0ea0723ca439856ba197 Mon Sep 17 00:00:00 2001 From: wangao Date: Thu, 8 Apr 2021 20:58:24 +0800 Subject: [PATCH] style: delete unused isHost check (#21203) --- packages/react-reconciler/src/ReactFiberCommitWork.new.js | 4 ++-- packages/react-reconciler/src/ReactFiberCommitWork.old.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/react-reconciler/src/ReactFiberCommitWork.new.js b/packages/react-reconciler/src/ReactFiberCommitWork.new.js index 48150f021a32b..68d7a9c7cf7fa 100644 --- a/packages/react-reconciler/src/ReactFiberCommitWork.new.js +++ b/packages/react-reconciler/src/ReactFiberCommitWork.new.js @@ -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 { @@ -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 { diff --git a/packages/react-reconciler/src/ReactFiberCommitWork.old.js b/packages/react-reconciler/src/ReactFiberCommitWork.old.js index ca3dbe363f071..6179bd12a7be9 100644 --- a/packages/react-reconciler/src/ReactFiberCommitWork.old.js +++ b/packages/react-reconciler/src/ReactFiberCommitWork.old.js @@ -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 { @@ -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 {