Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect Variable Mapping in Data Uploader File #42

Open
Valvide opened this issue Dec 26, 2023 · 0 comments
Open

Incorrect Variable Mapping in Data Uploader File #42

Valvide opened this issue Dec 26, 2023 · 0 comments

Comments

@Valvide
Copy link

Valvide commented Dec 26, 2023

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 be guestsIds.map((guest) => guest.id).

Steps to Reproduce:

  1. Navigate to the createBookings function in the data uploader file.
  2. Observe the line: const allGuestIds = guestsIds.map((cabin) => cabin.id);
  3. 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);

Sivasish48 added a commit to Sivasish48/ultimate-react-course that referenced this issue Jan 15, 2024
… createBookings function from using cabin ID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant