NeoLegends / velocity-pwa

🚴‍♂️💨 An alternative https://velocity-aachen.de/menu
3 stars 3 forks source link

Don't crash when `fees` in undefined #50

Open Empty2k12 opened 4 years ago

Empty2k12 commented 4 years ago

Max managed to get a transaction which was manually closed by Velo in the database and which has no fees field in the /bookings endpoint.

Not sure what the best fix is? Assume everything nullable and provide a default for every field?

NeoLegends commented 4 years ago

I guess we can special-case this occurency by maling the fee field 0, or we extend the logic to tread falsy values there as 0, basically turning kff „strict“ comparisons for that value.