@rnmapbox/maps 10.1.32-rc.1 → 10.1.32-rc.2

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.
@@ -12,6 +12,7 @@ import com.rnmapbox.rnmbx.modules.RNMBXOfflineModule
12
12
  import com.rnmapbox.rnmbx.modules.RNMBXLocationModule
13
13
  import com.facebook.react.bridge.ReactMethod
14
14
  import com.facebook.react.common.MapBuilder
15
+ import com.mapbox.bindgen.None
15
16
  import com.mapbox.common.*
16
17
  import com.mapbox.maps.MapView
17
18
  import com.mapbox.maps.MapboxMap
@@ -137,7 +138,11 @@ class RNMBXModule(private val mReactContext: ReactApplicationContext) : ReactCon
137
138
  mReactContext.runOnUiQueueThread {
138
139
  MapboxMap.clearData(mReactContext) {
139
140
  if (it.isValue) {
140
- promise.resolve(it.value)
141
+ if (it.value == None.getInstance()) {
142
+ promise.resolve(null)
143
+ } else {
144
+ promise.resolve(it.value)
145
+ }
141
146
  } else {
142
147
  promise.reject("error", "RNMBXModule.clearError ${it.error}")
143
148
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rnmapbox/maps",
3
3
  "description": "A Mapbox react native module for creating custom maps",
4
- "version": "10.1.32-rc.1",
4
+ "version": "10.1.32-rc.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },