From 420a8dfb2245d78d82f5a75405d6cb7d29936704 Mon Sep 17 00:00:00 2001 From: Romain Date: Wed, 10 Jun 2020 17:20:52 +0200 Subject: [PATCH] Update ClusteredMapView.js Fix for 'region' undefined in '_onRegionChangeComplete' --- lib/ClusteredMapView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ClusteredMapView.js b/lib/ClusteredMapView.js index 2f250e9..d27f288 100644 --- a/lib/ClusteredMapView.js +++ b/lib/ClusteredMapView.js @@ -125,7 +125,7 @@ const ClusteredMapView = forwardRef( }, [isSpiderfier, markers]); const _onRegionChangeComplete = (region) => { - if (superCluster) { + if (superCluster && region) { const bBox = calculateBBox(region); const zoom = returnMapZoom(region, bBox, minZoom); const markers = superCluster.getClusters(bBox, zoom);