Closed wrandall22 closed 2 years ago
Basically what was happening is that old events (ones created before this code) do not necessarily have a country, so answer.country === ''
at the point of the allCountries.find()
call. This lead to index 2 being called on undefined. If we check for country being empty first, we don't run into this issue.
cc @Benjamin-deVries just fyi
Only thing to review here is the 2nd commit. f55fed5
This reverts the revert of #803 and fixes the bug which caused us to revert.