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.
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.