From f703000d1f45bf8b607b65bf89e2ab22fcb222dc Mon Sep 17 00:00:00 2001 From: Tadeu Zagallo Date: Tue, 9 Jun 2015 17:04:55 -0700 Subject: [PATCH] [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 --- Examples/UIExplorer/GeolocationExample.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Examples/UIExplorer/GeolocationExample.js b/Examples/UIExplorer/GeolocationExample.js index 9bd744678..d9dd4e842 100644 --- a/Examples/UIExplorer/GeolocationExample.js +++ b/Examples/UIExplorer/GeolocationExample.js @@ -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});