Skip to content

Commit 420a8df

Browse files
romain-spielmanntomekvenits
authored andcommitted
Update ClusteredMapView.js
Fix for 'region' undefined in '_onRegionChangeComplete'
1 parent 3d6be0c commit 420a8df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ClusteredMapView.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ const ClusteredMapView = forwardRef(
125125
}, [isSpiderfier, markers]);
126126

127127
const _onRegionChangeComplete = (region) => {
128-
if (superCluster) {
128+
if (superCluster && region) {
129129
const bBox = calculateBBox(region);
130130
const zoom = returnMapZoom(region, bBox, minZoom);
131131
const markers = superCluster.getClusters(bBox, zoom);

0 commit comments

Comments
 (0)