From 36663f0aa69b897202228a1cde0a0fa18741ee41 Mon Sep 17 00:00:00 2001 From: nymkappa Date: Tue, 30 Aug 2022 08:18:14 +0200 Subject: [PATCH] Fix infinite loading spinner in channel map when no active channel exists --- .../app/lightning/nodes-channels/node-channels.component.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/lightning/nodes-channels/node-channels.component.ts b/frontend/src/app/lightning/nodes-channels/node-channels.component.ts index 074315b35..9447c6376 100644 --- a/frontend/src/app/lightning/nodes-channels/node-channels.component.ts +++ b/frontend/src/app/lightning/nodes-channels/node-channels.component.ts @@ -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;