Skip to content

Commit

Permalink
Fix geolocation error function binding
Browse files Browse the repository at this point in the history
  • Loading branch information
fredj committed Oct 1, 2018
1 parent 6248d89 commit c23ab1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/geolocation/mobile.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ exports.Controller_ = function($scope, $element,
}

// handle geolocation error.
this.geolocation_.on('error', function(error) {
this.geolocation_.on('error', (error) => {
this.untrack_();
let msg;
switch (error.code) {
Expand All @@ -147,7 +147,7 @@ exports.Controller_ = function($scope, $element,
}
this.notification_.error(msg);
$scope.$emit(exports.GeolocationEventType.ERROR, error);
}, this);
});

/**
* @type {ol.Feature}
Expand Down

0 comments on commit c23ab1d

Please sign in to comment.