[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:
Tadeu Zagallo 2015-06-09 17:04:55 -07:00
parent 3102fc5df9
commit f703000d1f
1 changed files with 2 additions and 2 deletions

View File

@ -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});