After some research found that this error appears when we have 2 components that use the usePlacesAutocompleteService hook. and it appears only for the 2nd component.
this is caused because on the 2nd load of the component, the google API is partially loaded, and we have google on the global scope, but we still don't have the google.maps object.
adding a check that google.maps object exists seem to solve this issue
Got same error as in issue #176
After some research found that this error appears when we have 2 components that use the
usePlacesAutocompleteService
hook. and it appears only for the 2nd component.this is caused because on the 2nd load of the component, the google API is partially loaded, and we have
google
on the global scope, but we still don't have thegoogle.maps
object.adding a check that
google.maps
object exists seem to solve this issue