From e244341e5cace519857bfd9889baf2b80d42124a Mon Sep 17 00:00:00 2001 From: William Craig Date: Mon, 20 Nov 2023 16:08:08 +0000 Subject: [PATCH] Added null coalesc for non populated johs --- .../ClientApp/src/app/services/booking-details.service.ts | 2 +- .../ClientApp/src/app/services/video-hearings.service.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/AdminWebsite/AdminWebsite/ClientApp/src/app/services/booking-details.service.ts b/AdminWebsite/AdminWebsite/ClientApp/src/app/services/booking-details.service.ts index 1fd27317b..5be767032 100644 --- a/AdminWebsite/AdminWebsite/ClientApp/src/app/services/booking-details.service.ts +++ b/AdminWebsite/AdminWebsite/ClientApp/src/app/services/booking-details.service.ts @@ -47,7 +47,7 @@ export class BookingDetailsService { const judges: Array = []; const judicialMembers: Array = []; - const mappedJohs = hearingResponse.judiciary_participants.map( + const mappedJohs = hearingResponse.judiciary_participants?.map( j => new JudiciaryParticipantDetailsModel( j.title, diff --git a/AdminWebsite/AdminWebsite/ClientApp/src/app/services/video-hearings.service.ts b/AdminWebsite/AdminWebsite/ClientApp/src/app/services/video-hearings.service.ts index 3dc4af6c5..5b921913b 100644 --- a/AdminWebsite/AdminWebsite/ClientApp/src/app/services/video-hearings.service.ts +++ b/AdminWebsite/AdminWebsite/ClientApp/src/app/services/video-hearings.service.ts @@ -326,7 +326,7 @@ export class VideoHearingsService { hearing.status = response.status; hearing.audio_recording_required = response.audio_recording_required; hearing.endpoints = this.mapEndpointResponseToEndpointModel(response.endpoints, response.participants); - hearing.judiciaryParticipants = response.judiciary_participants.map(judiciaryParticipant => + hearing.judiciaryParticipants = response.judiciary_participants?.map(judiciaryParticipant => JudicialMemberDto.fromJudiciaryParticipantResponse(judiciaryParticipant) ); hearing.isConfirmed = Boolean(response.confirmed_date);