Don't include the accuracy parameter in location events if accuracy could not be determined. (#7375)

* Don't include accuracy on geouri if not defined

* Use !== undefined

* Add a )
This commit is contained in:
Will Hunt 2021-12-15 21:06:40 +00:00 committed by GitHub
parent 11aa6c7435
commit b952fef195
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -188,9 +188,10 @@ class LocationPicker extends React.Component<IProps, IState> {
private getGeoUri = (position) => {
return (`geo:${ position.coords.latitude },` +
position.coords.longitude +
( position.coords.altitude != null ?
( position.coords.altitude !== undefined ?
`,${ position.coords.altitude }` : '' ) +
`;u=${ position.coords.accuracy }`);
( position.coords.accuracy !== undefined ?
`;u=${ position.coords.accuracy }` : '' ));
};
private onOk = () => {