Revert "Colorize trace paths for choose without explicit default case"

This reverts commit c1f462b8f8c5582ba9448bdea5da5173d23faea8.
This commit is contained in:
Thomas Lovén 2021-07-07 21:39:33 +00:00
parent c1f462b8f8
commit 137f8ad4cb

View File

@ -143,12 +143,11 @@ class HatScriptGraph extends LitElement {
graphStart = false graphStart = false
) { ) {
const trace = this.trace.trace[path] as ChooseActionTraceStep[] | undefined; const trace = this.trace.trace[path] as ChooseActionTraceStep[] | undefined;
const trace_path = const trace_path = trace?.[0].result
trace !== undefined ? trace[0].result.choice === "default"
? trace[0].result?.choice === "default" || trace[0].result === undefined ? [Array.isArray(config.choose) ? config.choose.length : 0]
? [Array.isArray(config.choose) ? config.choose.length : 0] : [trace[0].result.choice]
: [trace[0].result.choice] : [];
: [];
return html` return html`
<hat-graph <hat-graph
tabindex=${trace === undefined ? "-1" : "0"} tabindex=${trace === undefined ? "-1" : "0"}
@ -205,9 +204,7 @@ class HatScriptGraph extends LitElement {
<hat-graph-spacer <hat-graph-spacer
class=${classMap({ class=${classMap({
track: track:
trace !== undefined && trace !== undefined && trace[0].result?.choice === "default",
(trace[0].result?.choice === "default" ||
trace[0].result === undefined),
})} })}
></hat-graph-spacer> ></hat-graph-spacer>
${ensureArray(config.default)?.map((action, i) => ${ensureArray(config.default)?.map((action, i) =>