mirror of
https://github.com/mempool/mempool.git
synced 2024-11-20 02:11:49 +01:00
[lightning] fix js error when there is no geolocation available
This commit is contained in:
parent
47dd2cbd5d
commit
e79c32010d
@ -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…
Reference in New Issue
Block a user