Skip to content

Commit 762c1e7

Browse files
committed
Avoid setting camera with empty config
See mapbox/mapbox-maps-android#2454
1 parent 5290700 commit 762c1e7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

android/src/main/java/com/rnmapbox/rnmbx/components/camera/CameraUpdateItem.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,11 @@ class CameraUpdateItem(
7676
}
7777
}
7878
val map = mMap.get()
79-
if (map == null) {
79+
if (map == null || mCameraUpdate.center == null) {
8080
isCameraActionCancelled = true
8181
return
8282
}
83+
8384
val animationOptions = MapAnimationOptions.Builder();
8485

8586
// animateCamera / easeCamera only allows positive duration

0 commit comments

Comments
 (0)