If the form object is undefined, navigate to tasks (#247)

This commit is contained in:
jbirddog 2023-05-09 14:09:58 -04:00 committed by GitHub
parent 7b190d204b
commit be5dd0fe4c
1 changed files with 3 additions and 0 deletions

View File

@ -176,6 +176,9 @@ export default function TaskShow() {
if (disabled) {
return;
}
if (!formObject) {
navigate(`/tasks`);
}
let queryParams = '';
if (submitType === FormSubmitType.Draft) {
queryParams = '?save_as_draft=true';