@maplibre/maplibre-react-native 11.3.5 → 11.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -280,7 +280,7 @@ open class MLRNMapView(
280
280
  }
281
281
 
282
282
  fun removeFeature(childPosition: Int) {
283
- val child = children()[childPosition]
283
+ val child = children().getOrNull(childPosition) ?: return
284
284
 
285
285
  when (child) {
286
286
  is MapChild.FeatureChild -> {
@@ -313,7 +313,7 @@ open class MLRNMapView(
313
313
 
314
314
  val featureCount: Int get() = children().size
315
315
 
316
- fun getFeatureAt(i: Int): MapChild = children()[i]
316
+ fun getFeatureAt(i: Int): MapChild? = children().getOrNull(i)
317
317
 
318
318
  @Synchronized
319
319
  fun dispose() {
@@ -60,7 +60,7 @@ open class MLRNMapViewManager(
60
60
  override fun getChildAt(
61
61
  parent: MLRNMapView,
62
62
  index: Int,
63
- ): View? = parent.getFeatureAt(index).toView()
63
+ ): View? = parent.getFeatureAt(index)?.toView()
64
64
 
65
65
  override fun removeViewAt(
66
66
  parent: MLRNMapView,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maplibre/maplibre-react-native",
3
3
  "description": "React Native library for creating maps with MapLibre Native for Android & iOS",
4
- "version": "11.3.5",
4
+ "version": "11.3.6",
5
5
  "publishConfig": {
6
6
  "access": "public",
7
7
  "provenance": true