Skip to content

Commit

Permalink
Added null coalesc for non populated johs
Browse files Browse the repository at this point in the history
  • Loading branch information
will-craig committed Nov 20, 2023
1 parent 48d3546 commit e244341
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class BookingDetailsService {
const judges: Array<ParticipantDetailsModel> = [];
const judicialMembers: Array<JudiciaryParticipantDetailsModel> = [];

const mappedJohs = hearingResponse.judiciary_participants.map(
const mappedJohs = hearingResponse.judiciary_participants?.map(
j =>
new JudiciaryParticipantDetailsModel(
j.title,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e244341

Please sign in to comment.