Skip to content

Conversation

RKBoss6
Copy link
Contributor

@RKBoss6 RKBoss6 commented Oct 7, 2025

Fixed bugs relating to HRM data being incorrectly pulled in and comparing with undefined.
This comes from the discussion at #4010, and has been tested by me and @ondras12345

From the looks of it, this also fixes #4012

Removed unnecessary whitespace and comments in health function.
status: data.status,
consecutive: data.consecutive,
prevStatus: data.status === this.status ? undefined : this.status,
prevStatus: this.status,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this change needed? I wonder if it could have some unintended side effect?

@bobrippling
Copy link
Collaborator

bobrippling commented Oct 7, 2025

Not for this PR, but would you find it useful to have typescript check this code, to stop similar errors in future? I wouldn't mind making the change if so

@RKBoss6
Copy link
Contributor Author

RKBoss6 commented Oct 7, 2025

@bobrippling That would be good! Just a question: how does typescript checking differ from the checks that are already done?

@bobrippling
Copy link
Collaborator

@bobrippling That would be good! Just a question: how does typescript checking differ from the checks that are already done?

It'd be able to find typos such as object.propertyy that we might miss, or catch nulls and so on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SleepLog] Trigger returning undefined for prevStatus
4 participants