From 464ecffda7bff5680f0815703cd958f604d163e6 Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Tue, 24 Oct 2023 16:18:21 -0700 Subject: [PATCH] Fix a crash in trace graph generation for if/else (#18390) --- src/components/trace/hat-script-graph.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/trace/hat-script-graph.ts b/src/components/trace/hat-script-graph.ts index 4698396819..40afe60a62 100644 --- a/src/components/trace/hat-script-graph.ts +++ b/src/components/trace/hat-script-graph.ts @@ -298,7 +298,7 @@ export class HatScriptGraph extends LitElement { .notEnabled=${disabled || config.enabled === false} nofocus > - ${ensureArray(config.then).map((action, j) => + ${ensureArray(config.then ?? []).map((action, j) => this.render_action_node( action, `${path}/then/${j}`,