From c23ab1d1f0008c6d8e10a3b1fa70313360bdaae4 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Mon, 1 Oct 2018 08:27:55 +0200 Subject: [PATCH] Fix geolocation error function binding https://sentry.camptocamp.com/geo/geomapfish-demo/issues/143420 --- src/geolocation/mobile.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/geolocation/mobile.js b/src/geolocation/mobile.js index 2846e2fa6878..d600691c9829 100644 --- a/src/geolocation/mobile.js +++ b/src/geolocation/mobile.js @@ -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) { @@ -147,7 +147,7 @@ exports.Controller_ = function($scope, $element, } this.notification_.error(msg); $scope.$emit(exports.GeolocationEventType.ERROR, error); - }, this); + }); /** * @type {ol.Feature}