Skip to content

Commit a979d97

Browse files
committed
fix: Fixes some type assertions.
1 parent 381a755 commit a979d97

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

samples/elevation-simple/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,17 @@ function displayLocationElevation(
4242
if (results[0]) {
4343
// Open the infowindow indicating the elevation at the clicked position.
4444
infowindow.setContent(
45-
'The elevation at this point <br>is ' +
46-
results[0].elevation +
47-
' meters.'
45+
`The elevation at this point <br>is ${String(results[0].elevation)} meters.`
4846
);
4947
} else {
5048
infowindow.setContent('No results found');
5149
}
5250
})
53-
.catch((e) =>
54-
infowindow.setContent('Elevation service failed due to: ' + e)
55-
);
51+
.catch((e: unknown) => {
52+
infowindow.setContent(
53+
`Elevation service failed due to: ${String(e)}`
54+
);
55+
});
5656
}
5757

5858
void initMap();

0 commit comments

Comments
 (0)