fix undefined hourly rate bug
This commit is contained in:
@@ -17,7 +17,7 @@ const fetchAllBookings = () => {
|
|||||||
bookingData.forEach((fullBookingEntry) => {
|
bookingData.forEach((fullBookingEntry) => {
|
||||||
const fees = fullBookingEntry && fullBookingEntry.fees ? fullBookingEntry.fees : [];
|
const fees = fullBookingEntry && fullBookingEntry.fees ? fullBookingEntry.fees : [];
|
||||||
const firstFee = fees.length > 0 && fees[0].fee ? fees[0].fee : undefined;
|
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({
|
cleanedBookingReservations.push({
|
||||||
reservationId: fullBookingEntry['_id'],
|
reservationId: fullBookingEntry['_id'],
|
||||||
|
|||||||
Reference in New Issue
Block a user