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 5142bff89b
commit f6a9b75479
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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';