diff --git a/spiffworkflow-frontend/src/routes/TaskShow.tsx b/spiffworkflow-frontend/src/routes/TaskShow.tsx
index 3cddc676..9ab9ebf9 100644
--- a/spiffworkflow-frontend/src/routes/TaskShow.tsx
+++ b/spiffworkflow-frontend/src/routes/TaskShow.tsx
@@ -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';
@@ -347,20 +350,21 @@ export default function TaskShow() {
if (task.state === 'READY') {
let submitButtonText = 'Submit';
- let saveAsDraftButton = null;
+ let closeButton = null;
if (task.typename === 'ManualTask') {
submitButtonText = 'Continue';
} else if (task.typename === 'UserTask') {
- saveAsDraftButton = (
+ closeButton = (
);
}
@@ -369,7 +373,7 @@ export default function TaskShow() {
- {saveAsDraftButton}
+ {closeButton}
<>
{task.signal_buttons.map((signal) => (