-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[SleepLog] Fix important bugs with HRM being undefined #4023
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
base: master
Are you sure you want to change the base?
Conversation
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, |
There was a problem hiding this comment.
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?
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 |
@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 |
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