Correct ol event type propagation in Geolocation positionError

This commit is contained in:
Florent gravin
2018-09-18 14:13:50 +02:00
parent cd169ede0d
commit d062904cc1

View File

@@ -174,9 +174,12 @@ class Geolocation extends BaseObject {
* @param {PositionError} error error object.
*/
positionError_(error) {
error.type = EventType.ERROR;
const event = {
type: EventType.ERROR,
target: undefined
};
this.setTracking(false);
this.dispatchEvent(/** @type {{type: string, target: undefined}} */ (error));
this.dispatchEvent(event);
}
/**