diff --git a/src/components/use-map.tsx b/src/components/use-map.tsx index ecec8110..ac800030 100644 --- a/src/components/use-map.tsx +++ b/src/components/use-map.tsx @@ -51,7 +51,7 @@ export const MapProvider: React.FC<{}> = props => { ); }; -export function useMap(): {current?: MapRef; [id: string]: MapRef} { +export function useMap(): {current?: MapRef; [id: string]: MapRef | undefined} { const maps = useContext(MountedMapsContext)?.maps; const currentMap = useContext(MapContext);