Giners / mui-places-autocomplete

Google Material Design (Material-UI) styled React component using Google Maps Places Autocomplete
MIT License
34 stars 26 forks source link

Bug: Uncaught TypeError: Cannot read property 'description' of null when focus lost #19

Closed Giners closed 6 years ago

Giners commented 6 years ago

When rendering suggestions for the first time, if you click somewhere to cause focus to be lost (i.e. not the <input> element or the rendered suggestions container) then you will receive the following error: Uncaught TypeError: Cannot read property 'description' of null. This happens in the method we pass to the itemToString prop for the <Downshift> component.

Again, note that this only happens if a suggestion hasn't yet been selected. If you select a suggestion and then render suggestions and click somewhere to cause focus to be lost you don't experience this problem.