From 5d84c6a0e621d05d014841085f4d149a37b12f63 Mon Sep 17 00:00:00 2001 From: "Phyks (Lucas Verney)" Date: Sun, 26 Aug 2018 17:41:41 +0200 Subject: [PATCH] Fix a bug when position cannot be fetched --- src/views/Map.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/views/Map.vue b/src/views/Map.vue index 66c2989..17999e0 100644 --- a/src/views/Map.vue +++ b/src/views/Map.vue @@ -98,7 +98,11 @@ export default { computed: { currentLatLng() { // Check that this is a correct position - if (this.currentLocation === null) { + if ( + !this.currentLocation + || !this.currentLocation.latitude + || !this.currentLocation.longitude + ) { return null; } return [this.currentLocation.latitude, this.currentLocation.longitude];