Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Viewing all articles
Browse latest Browse all 1541

Uncaught TypeError: Cannot read properties of undefined (reading 'geometry') - onPlaceChanged() triggering but getPlace() returns undefined

$
0
0

I am getting some errors when I click on any prediction from the google places autocomplete dropdown of predictions. From what I've discovered it getPlace() returns "undefined" the first time it's triggered, but then it returns the address the second time around.

first click on a prediction from autocomplete dropdown

second click on the prediction

maps script

code for autocomplete

as can be seen in the code, I'm having a difficult time understanding why the getPlace doesn't return a place even though the listener triggers the onPlaceChanged(), and I'm not sure if the errors are the root of the problem, but if anyone has any clues so that i can get a different error to work with that would be appreciated.


Viewing all articles
Browse latest Browse all 1541

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>