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

Conversation

emontnemery
Copy link
Collaborator

Proposed change

Fix iteration index when displaying changed variables by checking the number of iterations instead of checking the index of the iteration being formatted

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue or discussion:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

@emontnemery emontnemery added this to the 2024.1 milestone Dec 29, 2023
@@ -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 😅

@bramkragten bramkragten merged commit 7e6d974 into dev Dec 30, 2023
14 checks passed
@bramkragten bramkragten deleted the automation_trace_fix_variable_iteration_index branch December 30, 2023 13:08
@github-actions github-actions bot locked and limited conversation to collaborators Jan 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants