You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When setting 'fields' in 'autoCompleteOptions' if address_components is missing then autocomplete fails with: Cannot read property 'forEach' of undefined #249
Uncaught TypeError: Cannot read property 'forEach' of undefined
...
place.address_components.forEach(value => { <--- this fails here because address_components is undefined
if (value.types.indexOf('street_number') > -1) {
germanAddress.streetNumber = value.short_name;
}
...
Desired functionality
Ideally it should only run that piece of code when there is an emitter set for onGermanAddressMapped OR it should always include address_components in the fields list. Or maybe a more descriptive message.
Mention any other details that might be useful
Work around for now is just to always include the 'address_components' in the fields list when specifying fields.
wottpal, nyates42, lynxeyedua, seanlawrenz, vdumbrav and 1 more