Merge pull request #4265 from mempool/nymkappa/fix-js-error-when-no-geolocation
[lightning] fix js error when there is no geolocation available
This commit is contained in:
commit
1e648a2dce
@ -114,7 +114,7 @@ export class NodesMap implements OnInit, OnChanges {
|
||||
node[3], // Alias
|
||||
node[2], // Public key
|
||||
node[5], // Channels
|
||||
node[6].en, // Country
|
||||
node[6]?.en, // Country
|
||||
node[7], // ISO Code
|
||||
]);
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user