From 7e6115a763ad64aa7efb6bfbcb78dc69995a61c4 Mon Sep 17 00:00:00 2001 From: Guillaume Beraudo Date: Mon, 15 Feb 2016 17:51:40 +0100 Subject: [PATCH] Fix geolocation error cast Despite the dispatchEvent method accepting a hash with a "target" property of "undefined", closure may still require the "target" property to be explicit. --- src/ol/geolocation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ol/geolocation.js b/src/ol/geolocation.js index 325d973207..7edcfdd148 100644 --- a/src/ol/geolocation.js +++ b/src/ol/geolocation.js @@ -191,7 +191,7 @@ ol.Geolocation.prototype.positionChange_ = function(position) { ol.Geolocation.prototype.positionError_ = function(error) { error.type = ol.events.EventType.ERROR; this.setTracking(false); - this.dispatchEvent(/** @type {{type: string}} */ (error)); + this.dispatchEvent(/** @type {{type: string, target: undefined}} */ (error)); };