Commit 2b0282a
facebook#11587 invoke error for getCurrentLocation
Summary:
It started with facebook#11587, which reported that the error returned by `getCurrentLocation` did not match the spec.
This resulted in PR facebook#11723, which did not get merged because it was said by ide and mkonicek that simply emitting the error will cause it to hang since the `error` callback was never invoked.
However, it seems like somewhere along the way PR facebook#13140 got merged in which did exactly that.
Since it now matches the spec, turning off location services on Android then running the below example code from [Geolocation](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/getCurrentPosition) docs errors out correctly.
```javascript
var options = {
enableHighAccuracy: true,
timeout: 5000,
maximumAge: 0
};
function success(pos) {
var crd = pos.coords;
console.log('Your current po
Closes facebook#13306
Differential Revision: D4833377
Pulled By: ericvicenti
fbshipit-source-id: dbea5948790a3f521751a0cc0a25f0e323b306671 parent b31704b commit 2b0282a
File tree
1 file changed
+3
-1
lines changed- ReactAndroid/src/main/java/com/facebook/react/modules/location
1 file changed
+3
-1
lines changedLines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
127 | 129 | | |
128 | 130 | | |
129 | 131 | | |
| |||
0 commit comments