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:
@@ -191,7 +191,7 @@ ol.Geolocation.prototype.positionChange_ = function(position) {
|
|||||||
ol.Geolocation.prototype.positionError_ = function(error) {
|
ol.Geolocation.prototype.positionError_ = function(error) {
|
||||||
error.type = ol.events.EventType.ERROR;
|
error.type = ol.events.EventType.ERROR;
|
||||||
this.setTracking(false);
|
this.setTracking(false);
|
||||||
this.dispatchEvent(/** @type {{type: string}} */ (error));
|
this.dispatchEvent(/** @type {{type: string, target: undefined}} */ (error));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user