KatrinaHoffert / EatSafe

An app for finding safe places to eat
Other
2 stars 2 forks source link

Should not submit city typeahead for obviously invalid entry #147

Closed KatrinaHoffert closed 9 years ago

KatrinaHoffert commented 9 years ago

Should display an on-page error if that occurs.

Existing check for this exists, but is broken. See the line of code with

obj == null && $.inArray(municipalityFieldValue, cities) !== -1

That is checking that the city is not in the array, but it should be the other way around. Needs refactoring because the $.inArray stuff is terribly unreadable. WTF jQuery?

KatrinaHoffert commented 9 years ago

I fixed this a few days ago.