Skip to content

Commit 45533b7

Browse files
committed
fix: avoid "property of null" error
1 parent 0781ed5 commit 45533b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mapbox.android.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ export class MapboxView extends MapboxViewBase {
432432

433433
console.log( "MapboxView:initMap(): top - accessToken is '" + this.config.accessToken + "'", this.config );
434434

435-
if ( ! this.nativeMapView && ( this.config.accessToken || this.settings.accessToken )) {
435+
if ( ! this.nativeMapView && ( this.config && this.config.accessToken || this.settings && this.settings.accessToken )) {
436436

437437
this.mapbox = new Mapbox();
438438

@@ -830,7 +830,7 @@ export class Mapbox extends MapboxCommon implements MapboxApi {
830830
//
831831
// FIXME: Even if using a local server add some string.
832832

833-
if ( settings.accessToken === undefined) {
833+
if (settings.accessToken === undefined) {
834834
reject( "Please set the 'accessToken' parameter" );
835835
return;
836836
}

0 commit comments

Comments
 (0)