Skip to content

Commit

Permalink
add catch block to subform submission loading
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanbond committed Dec 6, 2023
1 parent df69371 commit 3051d51
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/form/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,9 @@ export default class FormComponent extends Component {
const formId = submission.form || this.formObj.form || this.component.form;
const submissionUrl = `${this.subForm.formio.formsUrl}/${formId}/submission/${submission._id}`;
this.subForm.setUrl(submissionUrl, this.options);
this.subForm.loadSubmission();
this.subForm.loadSubmission().catch((err) => {
console.error(`Unable to load subform submission ${submission._id}:`, err);
});
}
else {
this.subForm.setValue(submission, flags);
Expand Down

0 comments on commit 3051d51

Please sign in to comment.