Tytan888 / CSSWENG-S11-G1

0 stars 0 forks source link

Minor bug: The AGE attribute of the children are not rendered in the donate - select page #11

Closed rpineda26 closed 11 months ago

rpineda26 commented 11 months ago

💾 Description: When choosing which child to sponsor, the age of the child is not rendered properly. However, when choosing a child and moving on to the page that gives more description to the child, the age is rendered correctly. ⏰ Expected Outcome: The age of the child should be seen in the page where the sponsor must choose from a list of children. ☎️ Actual Outcome: The age of the child is not rendered. 🎶 Steps to Reproduce:

  1. Make sure the database is populated.
  2. Go to: 'https://www.psbfp.org/donate/select/child'
  3. Check the age text.

The first image shows the page with an error. image

The second image shows the page free of error. image

Tytan888 commented 11 months ago

🛠️ Fix: The bug was caused by a side effect of asynchronous awaits. Due to this part of the code... image ...this part of the code wasn't able to update the ages correctly. image

As a fix, the previously error-producing forEach with async functions has been replaced with a simple for loop, solving the issue. image

New Output/Behavior: image The age field now displays properly as intended.