Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
) There is an issue where if you search and render suggestions for the first time (i.e. a suggestion hasn't been selected yet) and click away so taht focus is lost then you will receive an error of the form: "Uncaught TypeError: Cannot read property 'description' of null". This error occurs in the function we pass to the 'itemToString' prop when rendering the <Downshift> component. Its a result of no suggestions being available yet trying to destructure the 'description' property off of a suggestion. This commit provides a fix to guard against the case where there are no suggestions, in which case we simply return the empty string. modified: src/MUIPlacesAutocomplete.jsx
- Loading branch information