datasektionen / bawang

En inte längre ny hemsida. I nutiden. Som purjo fast klyftigare.
https://datasektionen.se
2 stars 4 forks source link

Calypso undefined protection #68

Closed Herkarl closed 6 months ago

Herkarl commented 6 months ago

Apparently Calypso doesn't return json for some malformed queries.

(eg. [https://calypso.datasektionen.se/api/item/\[](https://calypso.datasektionen.se/api/item/[)) This adds undefined protection for one of the places that uses the Calypso component. This is the only instance of the Calypso component that fetches a direct item, all other ones fetches a list of items with some kind of filter applied, and should not be affected by this particular error.

I started refactoring the component a bit, but decided to not do too much. Getting an itch from it, so might do a larger refactor at some point.