Fix ReferenceError: cutoff is not defined in applyFilter#124
Open
fheinent wants to merge 1 commit into
Open
Conversation
`applyFilter` was refactored to destructure `{ start, end }` from
`getRangeBounds`, but the hourly chart's filter still referenced the
removed `cutoff` variable. This threw at runtime on every render,
breaking the entire dashboard (no stats, no charts, no tables).
Replace `cutoff` with the same `start`/`end` bounds used by the daily
filter at line 660, so hourly data respects the selected range too.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
applyFilterwas refactored to destructure{ start, end }fromgetRangeBounds,but the hourly chart's filter still references the removed
cutoffvariable(dashboard.py:745). This throws
ReferenceError: cutoff is not definedon every render, breaking the entire dashboard — no stats, no charts,no tables.
Repro
python3 cli.py dashboardhttp://localhost:8080ReferenceError: cutoff is not defined at applyFilterFix
Replace
cutoffwith the samestart/endbounds used by the daily filterat line 660, so the hourly chart respects the selected range too.
Test plan
main(grep cutoff dashboard.py→ 1 hit on line 745)