You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the createBookings function of the data uploader file, there seems to be an issue with the mapping of guestId. The variable allGuestIds is being populated using guestsIds.map((cabin) => cabin.id), but it appears that cabin.id is incorrect in this context. It should be guestsIds.map((guest) => guest.id).
Steps to Reproduce:
Navigate to the createBookings function in the data uploader file.
Observe the line: const allGuestIds = guestsIds.map((cabin) => cabin.id);
Note that cabin.id is used to map guest IDs, which seems to be incorrect.
Expected Behavior:
The allGuestIds variable should be populated using the correct mapping, like so: const allGuestIds = guestsIds.map((guest) => guest.id);
The text was updated successfully, but these errors were encountered:
Sivasish48
added a commit
to Sivasish48/ultimate-react-course
that referenced
this issue
Jan 15, 2024
Description
In the createBookings function of the data uploader file, there seems to be an issue with the mapping of guestId. The variable allGuestIds is being populated using
guestsIds.map((cabin) => cabin.id)
, but it appears that cabin.id is incorrect in this context. It should beguestsIds.map((guest) => guest.id)
.Steps to Reproduce:
const allGuestIds = guestsIds.map((cabin) => cabin.id);
Expected Behavior:
The allGuestIds variable should be populated using the correct mapping, like so:
const allGuestIds = guestsIds.map((guest) => guest.id);
The text was updated successfully, but these errors were encountered: