Skip to content

Commit

Permalink
add check to disable cancel button in isTaskCancellabl
Browse files Browse the repository at this point in the history
Signed-off-by: MiriSafra <[email protected]>
  • Loading branch information
MiriSafra committed Oct 30, 2024
1 parent c79a9ee commit 55a46d5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,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 55a46d5

Please sign in to comment.