-
Notifications
You must be signed in to change notification settings - Fork 4
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
fix: add null protection for locations field #800
Conversation
Preview Firebase Hosting URL: https://mobility-feeds-dev--pr-800-ldokw9n4.web.app |
@davidgamez I think we need to go around and correct other cases where this happens. e.g. :
We get an NPE and a white page when trying to display the summary for tld-933 |
): string { | ||
if (locations === undefined) { | ||
if (locations === undefined || locations === null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we use locations == null
to cover both cases? Why do we use a strict equality operator?
(I know its been closed for a while, but I suspect we'll have similar repairs to do. e.g. this comment)
Also a blank page for https://mobilitydatabase.org/feeds/tld-823 |
@isabelle-dr It's because you're logged in as a mobilitydata user. It's not a user facing issue - those are unpublished feeds. I can give you an overview of how this new workflow operates on Friday. |
Summary:
Fix #799
Expected behavior:
Having null values in locations don't crash the app.
Testing tips:
Follow steps in #799
Please make sure these boxes are checked before submitting your pull request - thanks!
./scripts/api-tests.sh
to make sure you didn't break anything