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

Commit b952fef

Browse files
authored
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 )
1 parent 11aa6c7 commit b952fef

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/views/location/LocationPicker.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,10 @@ class LocationPicker extends React.Component<IProps, IState> {
188188
private getGeoUri = (position) => {
189189
return (`geo:${ position.coords.latitude },` +
190190
position.coords.longitude +
191-
( position.coords.altitude != null ?
191+
( position.coords.altitude !== undefined ?
192192
`,${ position.coords.altitude }` : '' ) +
193-
`;u=${ position.coords.accuracy }`);
193+
( position.coords.accuracy !== undefined ?
194+
`;u=${ position.coords.accuracy }` : '' ));
194195
};
195196

196197
private onOk = () => {

0 commit comments

Comments
 (0)