From 73b07c4253358edd38feb5c2cb5daaa14ae028ad Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Wed, 14 Jun 2023 02:09:46 -0400 Subject: [PATCH] Fixes lack of remote button from breaking layout Adds protection for undefined rows (seen in logs) --- src/plus/webviews/graph/graphWebview.ts | 2 +- src/webviews/apps/plus/graph/GraphWrapper.tsx | 6 +++++- src/webviews/apps/plus/graph/graph.scss | 4 ++++ src/webviews/apps/plus/graph/graph.tsx | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/plus/webviews/graph/graphWebview.ts b/src/plus/webviews/graph/graphWebview.ts index 7799b97..1d4b0d5 100644 --- a/src/plus/webviews/graph/graphWebview.ts +++ b/src/plus/webviews/graph/graphWebview.ts @@ -1385,7 +1385,7 @@ export class GraphWebviewProvider implements WebviewProvider { ); } - @debug() + @debug({ args: false }) private async notifyDidChangeRowsStats(graph: GitGraph) { if (graph.rowsStats == null) return; diff --git a/src/webviews/apps/plus/graph/GraphWrapper.tsx b/src/webviews/apps/plus/graph/GraphWrapper.tsx index 285bed0..7c61001 100644 --- a/src/webviews/apps/plus/graph/GraphWrapper.tsx +++ b/src/webviews/apps/plus/graph/GraphWrapper.tsx @@ -1048,7 +1048,11 @@ export function GraphWrapper({ return ( <>
-
+
{repo && branchState?.provider?.url && ( { } private onSelectionChanged(rows: GraphRow[]) { - const selection = rows.map(r => ({ id: r.sha, type: r.type as GitGraphRowType })); + const selection = rows.filter(r => r != null).map(r => ({ id: r.sha, type: r.type as GitGraphRowType })); this.sendCommand(UpdateSelectionCommandType, { selection: selection, });