Fix alert's error message

Summary:
`error` is not an object so `error.message` will return 'undefined'
Closes https://github.com/facebook/react-native/pull/9271

Differential Revision: D3689980

Pulled By: javache

fbshipit-source-id: 07de946f04cdff0e8013faa2c5512c51c82147b9
This commit is contained in:
Adrian Paul Matos 2016-08-09 04:31:37 -07:00 committed by Facebook Github Bot 2
parent 1227675e0a
commit 8af6aefd54

View File

@ -59,7 +59,7 @@ class GeolocationExample extends React.Component {
var initialPosition = JSON.stringify(position);
this.setState({initialPosition});
},
(error) => alert(error.message),
(error) => alert(error),
{enableHighAccuracy: true, timeout: 20000, maximumAge: 1000}
);
this.watchID = navigator.geolocation.watchPosition((position) => {