Skip to content

Commit

Permalink
Merge pull request #4277 from camptocamp/geolocation_error_bind
Browse files Browse the repository at this point in the history
Fix geolocation error function binding
  • Loading branch information
fredj authored Oct 1, 2018
2 parents 6248d89 + c23ab1d commit a1210ea
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 a1210ea

Please sign in to comment.