Fix the empty form issue, round 2 (#248)

This commit is contained in:
jbirddog 2023-05-10 10:58:01 -04:00 committed by GitHub
parent 4dc9204ecd
commit 1a81a73ab1
1 changed files with 3 additions and 2 deletions

View File

@ -176,8 +176,10 @@ export default function TaskShow() {
if (disabled) {
return;
}
if (!formObject) {
const dataToSubmit = formObject?.formData;
if (!dataToSubmit) {
navigate(`/tasks`);
return;
}
let queryParams = '';
if (submitType === FormSubmitType.Draft) {
@ -185,7 +187,6 @@ export default function TaskShow() {
}
setDisabled(true);
removeError();
const dataToSubmit = formObject.formData;
delete dataToSubmit.isManualTask;
HttpService.makeCallToBackend({
path: `/tasks/${params.process_instance_id}/${params.task_id}${queryParams}`,