Skip to content

Commit

Permalink
fix: Updates demo to correctly load Place library.
Browse files Browse the repository at this point in the history
  • Loading branch information
willum070 committed Jul 12, 2024
1 parent ae2cb87 commit 9b1e0cd
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 9b1e0cd

Please sign in to comment.