We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug
The Geolocation error is still being returned from both useCurrentPosition and useWatchPosition hooks, even that the position has been read.
useCurrentPosition
useWatchPosition
To Reproduce
{ currentPosition: undefined, error: Error }
{ currentPosition: GeolocationPosition, error: Error }
Expected behavior Hooks should not return error when it does not happen
Desktop (please complete the following information):
Smartphone (please complete the following information): Not tested
Additional context Hooks should reset the error state on success:
const id = await Geolocation.watchPosition(options || {}, (pos: Position | null, err) => { - if (err) { - setError(err); - } + setError(err); if (pos) { setCurrentPosition(pos); } });
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
The Geolocation error is still being returned from both
useCurrentPosition
anduseWatchPosition
hooks, even that the position has been read.To Reproduce
{ currentPosition: undefined, error: Error }
{ currentPosition: GeolocationPosition, error: Error }
Expected behavior
Hooks should not return error when it does not happen
Screenshots
Desktop (please complete the following information):
Smartphone (please complete the following information):
Not tested
Additional context
Hooks should reset the error state on success:
The text was updated successfully, but these errors were encountered: