Skip to content

Commit 7e3d874

Browse files
authored
fix: Updates demo to correctly load Place library. (#1777)
1 parent ee35ee3 commit 7e3d874

File tree

1 file changed

+1
-3
lines changed
  • samples/place-autocomplete-element

1 file changed

+1
-3
lines changed

samples/place-autocomplete-element/index.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ async function initMap(): Promise<void> {
99
// [START maps_place_autocomplete_element_add]
1010
// Request needed libraries.
1111
//@ts-ignore
12-
const [{ Map }] = await Promise.all([
13-
google.maps.importLibrary("places"),
14-
]);
12+
await google.maps.importLibrary("places") as google.maps.PlacesLibrary;
1513
// Create the input HTML element, and append it.
1614
//@ts-ignore
1715
const placeAutocomplete = new google.maps.places.PlaceAutocompleteElement();

0 commit comments

Comments
 (0)