[ReactNative] Replace console.error with alert on UIExplorer Geolocation example
Summary: @public The alert is less aggressive, otherwise it seems like the app is broken. Test Plan: Run the UIExplorer, open the Geolocation example and deny access. It should alert instead of redbox'ing
This commit is contained in:
parent
3102fc5df9
commit
f703000d1f
|
@ -50,8 +50,8 @@ var GeolocationExample = React.createClass({
|
|||
componentDidMount: function() {
|
||||
navigator.geolocation.getCurrentPosition(
|
||||
(initialPosition) => this.setState({initialPosition}),
|
||||
(error) => console.error(error),
|
||||
{enableHighAccuracy: true, timeout: 100, maximumAge: 1000}
|
||||
(error) => alert(error.message),
|
||||
{enableHighAccuracy: true, timeout: 20000, maximumAge: 1000}
|
||||
);
|
||||
this.watchID = navigator.geolocation.watchPosition((lastPosition) => {
|
||||
this.setState({lastPosition});
|
||||
|
|
Loading…
Reference in New Issue