Fix a bug when position cannot be fetched
This commit is contained in:
parent
9fc2128679
commit
5d84c6a0e6
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user