Skip to content

Commit dc8ba66

Browse files
authored
Consolidates textInput/textInputButton vars
Removes extra declaration and set as const.
1 parent 6110387 commit dc8ba66

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

samples/place-text-search/index.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ let center;
1111
let infoWindow;
1212

1313
async function initMap() {
14-
let textInput;
15-
let textInputButton;
1614
const { Map, InfoWindow } = await google.maps.importLibrary("maps") as google.maps.MapsLibrary;
1715

1816
center = { lat: 37.4161493, lng: -122.0812166 };
@@ -23,8 +21,8 @@ async function initMap() {
2321
mapId: 'DEMO_MAP_ID',
2422
});
2523

26-
textInput = document.getElementById('text-input') as HTMLInputElement;
27-
textInputButton = document.getElementById('text-input-button') as HTMLButtonElement;
24+
const textInput = document.getElementById('text-input') as HTMLInputElement;
25+
const textInputButton = document.getElementById('text-input-button') as HTMLButtonElement;
2826
const card = document.getElementById('text-input-card') as HTMLElement;
2927
map.controls[google.maps.ControlPosition.TOP_LEFT].push(card);
3028

0 commit comments

Comments
 (0)