Apply strictNullChecks to src/components/views/location/* (#10249
* strict fixes * accessiblebutton without onClick explicit * strict fix for UserMenu BaseAvatar
This commit is contained in:
parent
6de8d85f7e
commit
dd6fc124d7
12 changed files with 46 additions and 31 deletions
|
@ -70,6 +70,9 @@ const useMapWithStyle = ({
|
|||
if (map && centerGeoUri) {
|
||||
try {
|
||||
const coords = parseGeoUri(centerGeoUri);
|
||||
if (!coords) {
|
||||
throw new Error("Invalid geo URI");
|
||||
}
|
||||
map.setCenter({ lon: coords.longitude, lat: coords.latitude });
|
||||
} catch (_error) {
|
||||
logger.error("Could not set map center");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue