ErrorPro / react-google-autocomplete

React components for google places API.
MIT License
473 stars 114 forks source link

fix: addListener is not a function #186

Closed niranjanv849 closed 1 year ago

niranjanv849 commented 1 year ago

Error handling for the case: TypeError: autocompleteRef.current.addListener is not a function

Funcitonality works fine, but test cases failiing on feature implemented areas because autocompleteRef.current returning null initially, so added this error handling code

niranjanv849 commented 1 year ago

Please look into this developers, This will be a huge problem for using usePlaceWidget hook when writing tests,