Fix infinite loading spinner in channel map when no active channel exists

This commit is contained in:
nymkappa 2022-08-30 08:18:14 +02:00
parent feff3c52ef
commit 36663f0aa6
No known key found for this signature in database
GPG Key ID: E155910B16E8BD04

View File

@ -44,13 +44,13 @@ export class NodeChannels implements OnChanges {
switchMap((response) => {
this.isLoading = true;
if ((response.body?.length ?? 0) <= 0) {
return [];
this.isLoading = false;
return [''];
}
return [response.body];
}),
tap((body: any[]) => {
if (body.length === 0) {
this.isLoading = false;
if (body.length === 0 || body[0].length === 0) {
return;
}
const biggestCapacity = body[0].capacity;