Skip to content

Commit

Permalink
🐛 Ensure task existence before checking the state (#2177)
Browse files Browse the repository at this point in the history
Resolves: https://issues.redhat.com/browse/MTA-4158

Signed-off-by: Maayan Hadasi <mguetta@redhat.com>
  • Loading branch information
mguetta1 authored Feb 6, 2025
1 parent 1b4a17b commit 019f133
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ export const ApplicationsTable: React.FC = () => {

const isTaskCancellable = (application: DecoratedApplication) => {
const task = application.tasks.currentAnalyzer;
return !TaskStates.Terminal.includes(task?.state ?? "");
return !!task && !TaskStates.Terminal.includes(task?.state ?? "");
};

// TODO: Review the refetchInterval calculation for the application list
Expand Down

0 comments on commit 019f133

Please sign in to comment.