From 67689794d00421eb5aaac7c3b93439ee8db8a7e2 Mon Sep 17 00:00:00 2001 From: Will Hunt Date: Wed, 15 Dec 2021 11:03:08 +0000 Subject: [PATCH 1/3] Don't include accuracy on geouri if not defined --- src/components/views/location/LocationPicker.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/views/location/LocationPicker.tsx b/src/components/views/location/LocationPicker.tsx index b5ed928dd35..61987866955 100644 --- a/src/components/views/location/LocationPicker.tsx +++ b/src/components/views/location/LocationPicker.tsx @@ -190,7 +190,8 @@ class LocationPicker extends React.Component { position.coords.longitude + ( position.coords.altitude != null ? `,${ position.coords.altitude }` : '' ) + - `;u=${ position.coords.accuracy }`); + ( position.coords.accuracy != null ? + `;u=${ position.coords.accuracy }` : '' ); }; private onOk = () => { From 26275cf3c9320e4a98fd0b106355d72a51e46d05 Mon Sep 17 00:00:00 2001 From: Will Hunt Date: Wed, 15 Dec 2021 11:10:11 +0000 Subject: [PATCH 2/3] Use !== undefined --- src/components/views/location/LocationPicker.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/views/location/LocationPicker.tsx b/src/components/views/location/LocationPicker.tsx index 61987866955..a35126ae087 100644 --- a/src/components/views/location/LocationPicker.tsx +++ b/src/components/views/location/LocationPicker.tsx @@ -188,9 +188,9 @@ class LocationPicker extends React.Component { private getGeoUri = (position) => { return (`geo:${ position.coords.latitude },` + position.coords.longitude + - ( position.coords.altitude != null ? + ( position.coords.altitude !== undefined ? `,${ position.coords.altitude }` : '' ) + - ( position.coords.accuracy != null ? + ( position.coords.accuracy !== undefined ? `;u=${ position.coords.accuracy }` : '' ); }; From 8f512c64f54aa2819f6450fcfb13d0cd994803a8 Mon Sep 17 00:00:00 2001 From: Will Hunt Date: Wed, 15 Dec 2021 11:13:33 +0000 Subject: [PATCH 3/3] Add a ) --- src/components/views/location/LocationPicker.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/location/LocationPicker.tsx b/src/components/views/location/LocationPicker.tsx index a35126ae087..f3f4d649860 100644 --- a/src/components/views/location/LocationPicker.tsx +++ b/src/components/views/location/LocationPicker.tsx @@ -191,7 +191,7 @@ class LocationPicker extends React.Component { ( position.coords.altitude !== undefined ? `,${ position.coords.altitude }` : '' ) + ( position.coords.accuracy !== undefined ? - `;u=${ position.coords.accuracy }` : '' ); + `;u=${ position.coords.accuracy }` : '' )); }; private onOk = () => {