[lightning] fix js error when there is no geolocation available
This commit is contained in:
@@ -20,6 +20,11 @@ export class GeolocationComponent implements OnChanges {
|
||||
formattedLocation: string = '';
|
||||
|
||||
ngOnChanges(): void {
|
||||
if (!this.data) {
|
||||
this.formattedLocation = '-';
|
||||
return;
|
||||
}
|
||||
|
||||
const city = this.data.city ? this.data.city : '';
|
||||
const subdivisionLikeCity = this.data.city === this.data.subdivision;
|
||||
let subdivision = this.data.subdivision;
|
||||
|
||||
Reference in New Issue
Block a user