Skip to content

Commit

Permalink
fix: Updates demo to correctly load Place library. (#1777)
Browse files Browse the repository at this point in the history
  • Loading branch information
willum070 authored Jul 12, 2024
1 parent ee35ee3 commit 7e3d874
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions samples/place-autocomplete-element/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ async function initMap(): Promise<void> {
// [START maps_place_autocomplete_element_add]
// Request needed libraries.
//@ts-ignore
const [{ Map }] = await Promise.all([
google.maps.importLibrary("places"),
]);
await google.maps.importLibrary("places") as google.maps.PlacesLibrary;
// Create the input HTML element, and append it.
//@ts-ignore
const placeAutocomplete = new google.maps.places.PlaceAutocompleteElement();
Expand Down

0 comments on commit 7e3d874

Please sign in to comment.