Skip to content

Commit

Permalink
check for undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
RiteshHMCTS committed Nov 21, 2023
1 parent 4245f84 commit 7ad77bf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export class CaseEditSubmitComponent implements OnInit, OnDestroy {
this.contextFields = this.getCaseFields();
this.metadataFieldsObject = this.caseEdit?.caseDetails?.metadataFields?.
reduce((o, key) => Object.assign(o, {[key.id]: key.value}), {});
this.allFieldsValues = Object.assign(this.metadataFieldsObject, this.editForm.getRawValue().data);
this.allFieldsValues = Object.assign(this.metadataFieldsObject ? this.metadataFieldsObject : {}, this.editForm.getRawValue().data);
// Indicates if the submission is for a Case Flag, as opposed to a "regular" form submission, by the presence of
// a FlagLauncher field in the event trigger
this.caseEdit.isCaseFlagSubmission =
Expand Down

0 comments on commit 7ad77bf

Please sign in to comment.