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.
This commit is contained in:
Guillaume Beraudo
2016-02-15 17:51:40 +01:00
parent a5e463464a
commit 7e6115a763

View File

@@ -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));
};