Skip to content

Commit

Permalink
bug/CE-324 UPDATE (#234)
Browse files Browse the repository at this point in the history
  • Loading branch information
marqueone-ps authored Jan 2, 2024
1 parent cddcfd2 commit 238cd78
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontend/src/app/store/reducers/complaints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ export const complaintSlice = createSlice({
},
} = updatedComplaint;
const newStatus = complaint_status_code;
const assigned = convertPersonXrefToDelegate(person_complaint_xref[0]);
const delegates = !person_complaint_xref[0] ? [] : [convertPersonXrefToDelegate(person_complaint_xref[0])]

let complaint = { ...wildlife[index], status: newStatus, delegates: [assigned] };
let complaint = { ...wildlife[index], status: newStatus, delegates };
const update = [...wildlife];
update[index] = complaint;

Expand All @@ -129,9 +129,9 @@ export const complaintSlice = createSlice({
},
} = updatedComplaint;
const newStatus = complaint_status_code;
const assigned = convertPersonXrefToDelegate(person_complaint_xref[0]);
const delegates = !person_complaint_xref[0] ? [] : [convertPersonXrefToDelegate(person_complaint_xref[0])]

let complaint = { ...allegations[index], status: newStatus, delegates: [assigned] };
let complaint = { ...allegations[index], status: newStatus, delegates };
const update = [...allegations];
update[index] = complaint;

Expand Down

0 comments on commit 238cd78

Please sign in to comment.