codeforpdx / opentransit-metrics

Prototype of public transit data visualization system
https://opentransit-pdx.herokuapp.com/
MIT License
7 stars 8 forks source link

Issue 12: Fixed undefined property reference. #21

Closed erikjasso closed 2 years ago

erikjasso commented 2 years ago

Fixes #12. I added comments to functions/variables/etc. as I was working through the issue but the solution to the bug itself was to change an undefined reference in setDateRange() from:

const date = initialGraphParams.date

to:

const date = initialGraphParams[targetRange].date;

The undefined ref was causing the NoDaysSelectedAlert to fire, preventing the end date from updating.