diff --git a/Logic/GeoLocationHandler.ts b/Logic/GeoLocationHandler.ts index 29ae5c5..930e0ad 100644 --- a/Logic/GeoLocationHandler.ts +++ b/Logic/GeoLocationHandler.ts @@ -65,8 +65,8 @@ export class GeoLocationHandler extends UIElement { self._marker = newMarker; }); - navigator.permissions.query({name: 'geolocation'}) - .then(function (status) { + navigator?.permissions?.query({name: 'geolocation'}) + ?.then(function (status) { console.log("Geolocation is already", status) if (status.state === "granted") { self.StartGeolocating(); diff --git a/Logic/OsmConnection.ts b/Logic/OsmConnection.ts index e07751d..a0e2b8d 100644 --- a/Logic/OsmConnection.ts +++ b/Logic/OsmConnection.ts @@ -31,6 +31,7 @@ export class OsmConnection { this.userDetails.data.osmConnection = this; this.userDetails.data.dryRun = dryRun; this._dryRun = dryRun; + if (this.auth.authenticated()) { this.AttemptLogin(); // Also updates the user badge diff --git a/index.html b/index.html index 6ef7683..bc19887 100644 --- a/index.html +++ b/index.html @@ -47,7 +47,7 @@
- +