mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-25 05:47:20 +00:00
Check for null
action nodes before rendering (#10017)
This commit is contained in:
parent
5893559951
commit
cb11c6b3ea
@ -173,21 +173,25 @@ export class HatScriptGraph extends LitElement {
|
|||||||
?track=${track_this}
|
?track=${track_this}
|
||||||
?active=${this.selected === branch_path}
|
?active=${this.selected === branch_path}
|
||||||
></hat-graph-node>
|
></hat-graph-node>
|
||||||
${ensureArray(branch.sequence).map((action, j) =>
|
${branch.sequence !== null
|
||||||
|
? ensureArray(branch.sequence).map((action, j) =>
|
||||||
this.render_action_node(
|
this.render_action_node(
|
||||||
action,
|
action,
|
||||||
`${branch_path}/sequence/${j}`
|
`${branch_path}/sequence/${j}`
|
||||||
)
|
)
|
||||||
)}
|
)
|
||||||
|
: ""}
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
})
|
})
|
||||||
: ""}
|
: ""}
|
||||||
<div ?track=${track_default}>
|
<div ?track=${track_default}>
|
||||||
<hat-graph-spacer ?track=${track_default}></hat-graph-spacer>
|
<hat-graph-spacer ?track=${track_default}></hat-graph-spacer>
|
||||||
${ensureArray(config.default)?.map((action, i) =>
|
${config.default !== null
|
||||||
|
? ensureArray(config.default)?.map((action, i) =>
|
||||||
this.render_action_node(action, `${path}/default/${i}`)
|
this.render_action_node(action, `${path}/default/${i}`)
|
||||||
)}
|
)
|
||||||
|
: ""}
|
||||||
</div>
|
</div>
|
||||||
</hat-graph-branch>
|
</hat-graph-branch>
|
||||||
`;
|
`;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user