mirror of
https://github.com/vector-im/element-web.git
synced 2025-09-19 04:31:10 +02:00
Further type fixes
This commit is contained in:
parent
a3d09937d6
commit
93682e9d13
@ -21,7 +21,7 @@ import { createMap } from "./map";
|
|||||||
|
|
||||||
interface UseMapProps {
|
interface UseMapProps {
|
||||||
bodyId: string;
|
bodyId: string;
|
||||||
onError: (error: Error) => void;
|
onError?: (error: Error) => void;
|
||||||
interactive?: boolean;
|
interactive?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ export const useMap = ({ interactive, bodyId, onError }: UseMapProps): MapLibreM
|
|||||||
try {
|
try {
|
||||||
setMap(createMap(interactive, bodyId, onError));
|
setMap(createMap(interactive, bodyId, onError));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
onError(error);
|
onError?.(error);
|
||||||
}
|
}
|
||||||
return () => {
|
return () => {
|
||||||
if (map) {
|
if (map) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user