@samitouri / QOS-React / commits / 299a2714c3

Use stricter equality check (#15474)

Dan Abramov committed Apr 23, 2019 at 23:28 UTC 299a2714c3dbf6c1d401d4265a8bef2168b2035a
1 file changed +3 -3
packages/react-reconciler/src/ReactChildFiber.js
+3 -3
@@ -831,7 +831,7 @@ function ChildReconciler(shouldTrackSideEffects) {
831 newChildren[newIdx],
832 expirationTime,
833 );
834 - if (!newFiber) {
834 + if (newFiber === null) {
835 continue;
836 }
837 lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);
@@ -858,7 +858,7 @@ function ChildReconciler(shouldTrackSideEffects) {
858 newChildren[newIdx],
859 expirationTime,
860 );
861 - if (newFiber) {
861 + if (newFiber !== null) {
862 if (shouldTrackSideEffects) {
863 if (newFiber.alternate !== null) {
864 // The new fiber is a work in progress, but if there exists a
@@ -982,7 +982,7 @@ function ChildReconciler(shouldTrackSideEffects) {
982 // unfortunate because it triggers the slow path all the time. We need
983 // a better way to communicate whether this was a miss or null,
984 // boolean, undefined, etc.
985 - if (!oldFiber) {
985 + if (oldFiber === null) {
986 oldFiber = nextOldFiber;
987 }
988 break;