Skip to content

Commit

Permalink
Use stricter equality check (#15474)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon authored Apr 23, 2019
1 parent 017d6f1 commit 299a271
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/react-reconciler/src/ReactChildFiber.js
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ function ChildReconciler(shouldTrackSideEffects) {
newChildren[newIdx],
expirationTime,
);
if (!newFiber) {
if (newFiber === null) {
continue;
}
lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);
Expand All @@ -858,7 +858,7 @@ function ChildReconciler(shouldTrackSideEffects) {
newChildren[newIdx],
expirationTime,
);
if (newFiber) {
if (newFiber !== null) {
if (shouldTrackSideEffects) {
if (newFiber.alternate !== null) {
// The new fiber is a work in progress, but if there exists a
Expand Down Expand Up @@ -982,7 +982,7 @@ function ChildReconciler(shouldTrackSideEffects) {
// unfortunate because it triggers the slow path all the time. We need
// a better way to communicate whether this was a miss or null,
// boolean, undefined, etc.
if (!oldFiber) {
if (oldFiber === null) {
oldFiber = nextOldFiber;
}
break;
Expand Down

0 comments on commit 299a271

Please sign in to comment.