// Only fetch the data if coming from another route
if (this.isoData.path === this.context.router.route.match.url) {
- const communityRes = this.isoData.routeData[0] as
- | GetCommunityResponse
- | undefined;
+ const { communityResponse } = this.isoData.routeData;
- if (communityRes) {
+ if (communityResponse) {
const communityChoice: Choice = {
- label: communityResponse.community_view.community.name,
- label: communityRes.community_view.community.title,
- value: communityRes.community_view.community.id.toString(),
++ label: communityResponse.community_view.community.title,
+ value: communityResponse.community_view.community.id.toString(),
};
this.state = {