Skip to content

Commit

Permalink
[candidate parameters] diagnosis fix (#9365)
Browse files Browse the repository at this point in the history
After We merge the diagnosis new feature into 26.0-release([New Feature]
Tracking and Configuration of Candidate's Diagnosis Evolution
(#7560)), it cause a bug.
if diagnosis is empty. the whole candidate param page will be broken.
  • Loading branch information
kongtiaowang authored Sep 27, 2024
1 parent 108f96b commit 760f302
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/candidate_parameters/jsx/DiagnosisEvolution.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class DiagnosisEvolution extends Component {
formattedDiagnosisEvolution() {
const dxEvolution = this.state.data.diagnosisEvolution;
let formattedDxEvolution = [];
try {
dxEvolution.map((record) => {
let formattedDiagnosis = [];
Object.entries(JSON.parse(record.Diagnosis)).map((entry, index) => {
Expand Down Expand Up @@ -94,6 +95,9 @@ class DiagnosisEvolution extends Component {
]
);
});
} catch (error) {
console.error('Error parsing JSON:', error);
}
return formattedDxEvolution;
}

Expand Down

0 comments on commit 760f302

Please sign in to comment.