Skip to content
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

[🐛 BUG] - If you don't specify a walkingTime parsing response fails #88

Open
ParkMyCar opened this issue Oct 1, 2022 · 5 comments
Open
Assignees
Labels
🐛 bug Something isn't working 💡 enhancement New feature or request 🆘 help wanted Extra attention is needed ❔ question Further information is requested

Comments

@ParkMyCar
Copy link

Describe the bug
If you don't specify a walkingTime with each station, then you don't get back any train times, specifically the upTown and downTown lists are empty, because the time field for each trip is NaN

To Reproduce
Steps to reproduce the behavior:

  1. In your config don't set a walkingTime
  2. Run MagicMirror, no trains show up

Expected behavior
Expect train times to show up

Actual behavior
No train times show up

@ParkMyCar ParkMyCar added the 🐛 bug Something isn't working label Oct 1, 2022
@ParkMyCar
Copy link
Author

I think the fix is to update this line to something like:

return formattedTime - (walkingTime || 0)

Although I haven't tested it

@Elaniobro
Copy link
Owner

@ParkMyCar care to submit a PR?

@Elaniobro
Copy link
Owner

@ParkMyCar; did your suggestion resolve your issue?

@Elaniobro Elaniobro added 💡 enhancement New feature or request ❔ question Further information is requested labels Feb 19, 2023
@ParkMyCar
Copy link
Author

@ParkMyCar; did your suggestion resolve your issue?

It did! Sorry I never got around to submitting a PR

@Elaniobro
Copy link
Owner

Do you have time to do so now? 🙏

@Elaniobro Elaniobro added the 🆘 help wanted Extra attention is needed label Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working 💡 enhancement New feature or request 🆘 help wanted Extra attention is needed ❔ question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants