From b9df9bb9773339814862e9cc3846715e507cafd8 Mon Sep 17 00:00:00 2001 From: minnakt Date: Mon, 5 Feb 2024 18:05:43 -0500 Subject: [PATCH] DEVPROD-2707: Prevent restarting entire patch when restarting downstream tasks --- .../VersionRestartModal/VersionRestartModal.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/VersionRestartModal/VersionRestartModal.tsx b/src/components/VersionRestartModal/VersionRestartModal.tsx index d81a4c0106..df5c5ebff5 100644 --- a/src/components/VersionRestartModal/VersionRestartModal.tsx +++ b/src/components/VersionRestartModal/VersionRestartModal.tsx @@ -191,10 +191,12 @@ const selectTasksTotal = (selectedTasks: versionSelectedTasks) => ); const getTaskIds = (selectedTasks: versionSelectedTasks) => - Object.entries(selectedTasks).map(([versionId, tasks]) => ({ - versionId, - taskIds: selectedArray(tasks), - })); + Object.entries(selectedTasks) + .map(([versionId, tasks]) => ({ + versionId, + taskIds: selectedArray(tasks), + })) + .filter(({ taskIds }) => taskIds.length > 0); const ConfirmationMessage = styled(Body)` padding: ${size.s} 0;