You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you parse the result of navigator.geolocation.getCurrentPosition, despite coords object having field values, a codec parsing these values returns them successfully unassigned, e.g. an empty object, even when the values are required
🐛 Bug report
Current Behavior
When you parse the result of navigator.geolocation.getCurrentPosition, despite
coords
object having field values, a codec parsing these values returns them successfully unassigned, e.g. an empty object, even when the values are requiredExpected behavior
for codec
and
result has to be
{right: {latitude: ..., longitude: ...}}
instead, the result is
{right: {}}
Reproducible example
https://github.com/Firfi/io-ts-geo-repro
Suggested solution(s)
I expect io-ts either return parse errors or correct value
Additional context
It seems to be some special object proxying / getters involved in location.coords object
if I do
it works as expected
Your environment
macos + chrome,
osx + safari
https://github.com/Firfi/io-ts-geo-repro - latest
The text was updated successfully, but these errors were encountered: