We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 22ffdc8 commit 1b36396Copy full SHA for 1b36396
src/mapbox.android.ts
@@ -387,8 +387,9 @@ export class MapboxView extends MapboxViewBase {
387
Application.android.off(AndroidApplication.activityPausedEvent, this.onPause, this);
388
Application.android.off(AndroidApplication.activityResumedEvent, this.onResume, this);
389
// Application.android.off(AndroidApplication.activityStartedEvent, this.onStop, this);
390
-
391
- this.mapbox.destroy();
+ if (this.mapbox) {
+ this.mapbox.destroy();
392
+ }
393
super.disposeNativeView();
394
}
395
0 commit comments