Skip to content

Conversation

@saketh1999
Copy link

@saketh1999 saketh1999 commented Jul 15, 2024

While taking the course, I noticed this error. I hope this PR will be able to fix this.

### The Error:
We are rending "No Pets" when the pet.length is true where are we should be doing the opposite.

The error and the fix implemented here
image

Updating the conditional rendering for Pets
@Shramkoweb
Copy link

Shramkoweb commented Nov 20, 2024

@saketh1999 you're mistaken.
If pets.length is an empty array, we will get 0.
!0 = will return true - and we will jump in the correct branch, <h1>No Pets Found</h1>

Everything is correct in the code, your PR breaks the correct logic.

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

Successfully merging this pull request may close these issues.

2 participants