From be5dd0fe4c1b43353b03d4a6f0204993410bba25 Mon Sep 17 00:00:00 2001 From: jbirddog <100367399+jbirddog@users.noreply.github.com> Date: Tue, 9 May 2023 14:09:58 -0400 Subject: [PATCH] If the form object is undefined, navigate to tasks (#247) --- spiffworkflow-frontend/src/routes/TaskShow.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spiffworkflow-frontend/src/routes/TaskShow.tsx b/spiffworkflow-frontend/src/routes/TaskShow.tsx index 88325f2bf..9ab9ebf96 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';