Handle nil case for scheduled arrivals #8
Merged
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.
Hey Jordan! Love the updates to Nate's module. I was experiencing some issues with the other module since updating my Node version earlier today. Due to these issues, I was worried I'd have to take it off my mirror until I found yours, so thank you for the updates.
As for the reason for this PR, I frequent a bus stop that runs only on weekdays during work hours, so a good amount of time my mirror would show no options for bus ETAs (shown below).
Therefore, I added handling for this case which removes the
Direction/Arrival
headings and adds a note to the user that there are no planned arrivals.Additionally, I added a suffix of
min
ormins
respectively to the arrival times. This isn't a huge deal to me but I figured why not. Feel free to take whatever you want from here or nothing at all. Thanks again!Side note, I also noticed that the table re-renders each time an update interval is reached causing a momentary stutter in the display but that is a fix for another day