ANTON KADACH

Generation

fix invalid codeTue, 17 Jan 2023

const getParcelPickups = (parcels) => { return Promise.all( parcels.map((parcel) => { const [warehouse] = cacheContainer.warehousesByMerchantId.get(Number(parcel.merchantId)) || []; const pickupRegion = cacheContainer.pickupRegionsByGeoId.get(warehouse.geoId); return getPickupFromParcel({ warehouse, pickupRegion }); })) };

const getParcelPickups = (parcels) => { const pickups = []; for (const parcel of parcels) { const [warehouse] = cacheContainer.warehousesByMerchantId.get(Number(parcel.merchantId)) || []; const pickupRegion = cacheContainer.pickupRegionsByGeoId.get(warehouse.geoId); pickups.push(getPickupFromParcel({ warehouse, pickupRegion })); } return Promise.all(pickups); };

Questions about programming?Chat with your personal AI assistant