googlemaps / js-samples

Samples for the Google Maps JavaScript v3 API
https://developers.google.com/maps/documentation/javascript/
Other
744 stars 821 forks source link

Missing brackets in places-autocomplete-addressform #1637

Open ElkCreekSteve opened 9 months ago

ElkCreekSteve commented 9 months ago

Operating system

Win11

Browser Version

Edge 120.0.2210.77

How severe is the bug?

low

Bug description

When reusing the example from samples/places-autocomplete-addressform/index.ts, there are some curly brackets missing in the switch statement. "Locality" and "Country" don't have open/close brackets. This seems to work fine unless you remove the country field from the HTML and then the zip code portion breaks. Once you add in the appropriate brackets, it starts working correctly without the country field.

Steps to reproduce

Run the code as described on https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete-addressform#maps_places_autocomplete_addressform-javascript. Remove the country field from the HTML and see that Zip Code isn't populated. Edit the script to add the appropriate brackets and it starts working again.

Console log output

No response

wangela commented 9 months ago

If you would like to upvote the priority of this issue, please comment below or react on the original post above with :+1: so we can see what is popular when we triage.

@ElkCreekSteve Thank you for opening this issue. 🙏 Please check out these other resources that might help you get to a resolution in the meantime:

This is an automated message, feel free to ignore.

ElkCreekSteve commented 7 months ago

👍