Skip to content

Fix geolocation error cast #4845

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 17, 2016

Conversation

gberaudo
Copy link
Member

Despite the dispatchEvent method accepting a hash with a target property of undefined, closure may still require the target property to be explicit.

@gberaudo
Copy link
Member Author

Avoid the following error:

ERR! compile /home/gberaudo/dev/ol3-cesium/ol3/src/ol/geolocation.js:194: ERROR - actual parameter 1 of ol.Observable.prototype.dispatchEvent does not match formal parameter
ERR! compile found   : {type: string}
ERR! compile required: (null|ol.events.Event|string|{target: (EventTarget|null|ol.events.EventTarget|undefined), type: string})
ERR! compile   this.dispatchEvent(/** @type {{type: string}} */ (error));

Uncovered by openlayers/ol-cesium#317.

Despite the dispatchEvent method accepting a hash with a "target" property of
"undefined", closure may still require the "target" property to be
explicit.
@gberaudo gberaudo force-pushed the fix_geolocation_error_type branch from 0e4cfb0 to 7e6115a Compare February 16, 2016 10:36
@fredj
Copy link
Member

fredj commented Feb 16, 2016

LGTM

fredj added a commit that referenced this pull request Feb 17, 2016
@fredj fredj merged commit 9baa296 into openlayers:master Feb 17, 2016
@gberaudo gberaudo deleted the fix_geolocation_error_type branch February 17, 2016 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants