Skip to content

guard against undefined previousValue on first network reading - #578

Merged
corecoding merged 2 commits into
corecoding:developfrom
ThorOdinson246:fix-vitals-previousvalue-typeerror
Aug 16, 2026
Merged

guard against undefined previousValue on first network reading#578
corecoding merged 2 commits into
corecoding:developfrom
ThorOdinson246:fix-vitals-previousvalue-typeerror

Conversation

@ThorOdinson246

Copy link
Copy Markdown

Small one. values.js reads previousValue[1] before checking there is a previous value,
so the first time an interface shows up it throws:

TypeError: can't access property 1, previousValue is undefined

The .catch in sensors.js swallows it, so all you see is one missing reading for that
interface. Not a big deal on its own, but it happens for every new interface, which adds up
with docker or a VPN.

Guarded with a ternary.

Together with #577 this also sorts out the negative speeds in #545. That one needs both, so
I've left the closing keyword off it.

@corecoding
corecoding changed the base branch from main to develop August 16, 2026 17:18
@corecoding
corecoding merged commit 541ec32 into corecoding:develop Aug 16, 2026
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.

2 participants