Skip to content

Commit eab82b4

Browse files
authored
Merge pull request #362 from madmas/propertyOfNull
fix: avoid "property of null" error
2 parents 0781ed5 + 45533b7 commit eab82b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mapbox.android.ts

Lines changed: 2 additions & 2 deletions
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)