fix undefined hourly rate bug

This commit is contained in:
Bilal Catic
2019-07-22 06:03:22 +02:00
parent 00988b0dac
commit dae71475ec

View File

@@ -17,7 +17,7 @@ const fetchAllBookings = () => {
bookingData.forEach((fullBookingEntry) => {
const fees = fullBookingEntry && fullBookingEntry.fees ? fullBookingEntry.fees : [];
const firstFee = fees.length > 0 && fees[0].fee ? fees[0].fee : undefined;
const hourlyRate = firstFee && firstFee.price ? firstFee.price : undefined;
const hourlyRate = firstFee && firstFee.price ? firstFee.price : 0;
cleanedBookingReservations.push({
reservationId: fullBookingEntry['_id'],