Skip to content

Commit

Permalink
Merge pull request #139 from wherehows/patch-2
Browse files Browse the repository at this point in the history
[refactor] make a function more reliable
  • Loading branch information
giorgiabosello authored Oct 24, 2023
2 parents e9a9807 + e4c7778 commit 329cb19
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/map/map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function MapComponent({
events = [],
}: MapProps) {
const mapRef = useRef<HTMLDivElement>(null)
const prevBoundsRef = useRef<number[] | undefined>()
const prevBoundsRef = useRef<number[]>([])
const [map, setMap] = useState<Map>()
const [maps, setMaps] = useState<MapsLibrary>()
const [googleApiCalled, setGoogleApiCalled] = useState<boolean>(false)
Expand Down
2 changes: 1 addition & 1 deletion src/utils/utils.ts
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down

0 comments on commit 329cb19

Please sign in to comment.