Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Don't include the accuracy parameter in location events if accuracy c…
Browse files Browse the repository at this point in the history
…ould not be determined. (#7375)

* Don't include accuracy on geouri if not defined

* Use !== undefined

* Add a )
  • Loading branch information
Half-Shot committed Dec 15, 2021
1 parent 11aa6c7 commit b952fef
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/views/location/LocationPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () => {
Expand Down

0 comments on commit b952fef

Please sign in to comment.