fullstackopen
fullstackopen copied to clipboard
Bug in if statement part2/countries/components/Content.js
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.