fix: stationBoard entries can be nullish#41
Merged
traines-source merged 1 commit intopublic-transport:mainfrom Dec 15, 2025
Merged
fix: stationBoard entries can be nullish#41traines-source merged 1 commit intopublic-transport:mainfrom
entries can be nullish#41traines-source merged 1 commit intopublic-transport:mainfrom
Conversation
Member
traines-source
left a comment
There was a problem hiding this comment.
Thanks. Is it actually entries or one of the other fields that would have been expected for the profile you're using? Anyways, while it has the same effect, I think one could just always fall back to [].
If you have a case that reliably reproduces this, you could indeed add an integration test (see https://github.com/public-transport/db-vendo-client/blob/main/docs/tests.md#adding-integration-test-fixtures). If not, it's probably not worth the hassle and we'll just keep it as it is.
When no entries are present an error was thrown when calling `entries.flat()`
74fa7b3 to
e82e538
Compare
Contributor
Author
|
I didn't grabbed a full dump of the call, but text content from the response is a simple |
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.
Station board sometimes returns
{}, causing an error to be thrown when callingentries.flat().Should I add a test ? If yes would it go in the
.har?