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

Bug in if statement part2/countries/components/Content.js #65

Open
Smcelli opened this issue Jan 4, 2023 · 0 comments
Open

Bug in if statement part2/countries/components/Content.js #65

Smcelli opened this issue Jan 4, 2023 · 0 comments

Comments

@Smcelli
Copy link

Smcelli commented Jan 4, 2023

If countries.length is 10 or 2, then countries[0] will be displayed as if it is the only country in the array. Change line 11 to
"} else if ((countries.length > 1 || countries.length === 0) {"
will avoid this, since countries.length >10 is handled in the previous if statement. The extra condition of "&& countries.length <10" is not needed.

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