Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix iteration index when displaying changed variables #19184

Merged
merged 1 commit into from
Dec 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/trace/ha-trace-path-details.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export class HaTracePathDetails extends LitElement {
<div class="padded-box">
${data.map(
(trace, idx) => html`
${idx > 0
${data.length > 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If data.length === 0 we would never get here right? So this check seems useless?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, if data.length === 0 we don't get here. But if data.length === 1 we sure do, and that's the case fixed by this PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind I reviewed way too hurried 😅

? html`<p>
${this.hass!.localize(
"ui.panel.config.automation.trace.path.iteration",
Expand Down
Loading