From cb11c6b3eabc9f35fbcb9f6dcc864d1f83589726 Mon Sep 17 00:00:00 2001 From: Philip Allgaier Date: Tue, 14 Sep 2021 23:20:09 +0200 Subject: [PATCH] Check for `null` action nodes before rendering (#10017) --- src/components/trace/hat-script-graph.ts | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/components/trace/hat-script-graph.ts b/src/components/trace/hat-script-graph.ts index d0e96a4540..2c416d8725 100644 --- a/src/components/trace/hat-script-graph.ts +++ b/src/components/trace/hat-script-graph.ts @@ -173,21 +173,25 @@ export class HatScriptGraph extends LitElement { ?track=${track_this} ?active=${this.selected === branch_path} > - ${ensureArray(branch.sequence).map((action, j) => - this.render_action_node( - action, - `${branch_path}/sequence/${j}` - ) - )} + ${branch.sequence !== null + ? ensureArray(branch.sequence).map((action, j) => + this.render_action_node( + action, + `${branch_path}/sequence/${j}` + ) + ) + : ""} `; }) : ""}
- ${ensureArray(config.default)?.map((action, i) => - this.render_action_node(action, `${path}/default/${i}`) - )} + ${config.default !== null + ? ensureArray(config.default)?.map((action, i) => + this.render_action_node(action, `${path}/default/${i}`) + ) + : ""}
`;