Skip to content

Commit

Permalink
refactor: provide initial ref of prevBoundsRef as empty array
Browse files Browse the repository at this point in the history
  • Loading branch information
wherehows authored Oct 24, 2023
1 parent dbe47ec commit e4c7778
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit e4c7778

Please sign in to comment.