mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-26 14:27:20 +00:00
Revert "Colorize trace paths for choose without explicit default case"
This reverts commit c1f462b8f8c5582ba9448bdea5da5173d23faea8.
This commit is contained in:
parent
c1f462b8f8
commit
137f8ad4cb
@ -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) =>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user