diff --git a/src/map/map.tsx b/src/map/map.tsx index f06643b..7278618 100644 --- a/src/map/map.tsx +++ b/src/map/map.tsx @@ -22,7 +22,7 @@ function MapComponent({ events = [], }: MapProps) { const mapRef = useRef(null) - const prevBoundsRef = useRef() + const prevBoundsRef = useRef([]) const [map, setMap] = useState() const [maps, setMaps] = useState() const [googleApiCalled, setGoogleApiCalled] = useState(false) diff --git a/src/utils/utils.ts b/src/utils/utils.ts index be35f22..492cb87 100644 --- a/src/utils/utils.ts +++ b/src/utils/utils.ts @@ -1,4 +1,4 @@ -export const isArraysEqualEps = (arrayA: number[], arrayB?: number[], eps = 0.000001): boolean => { +export const isArraysEqualEps = (arrayA: number[], arrayB: number[], eps = 0.000001): boolean => { if (arrayA && arrayB) { for (let i = 0; i !== arrayA.length; ++i) { if (Math.abs(arrayA[i] - arrayB[i]) > eps) {