深拷贝和浅拷贝

   const filterUnit = JSON.parse(JSON.stringify(unit));
   filterUnit.node.listings = rankingListings(
     filterUnit.node.listings,
     filterKey && filterKey === listingStateTypes.AVAILABLE_WITH_PRICE,
   );
   unitAfterRankingListings.push(filterUnit);
   return true;
 });

 const unitsResult = rankingUnitTypes(unitAfterRankingListings);

你可能感兴趣的:(深拷贝和浅拷贝)