From e61b0a4d673b74e99b84c1d075b910db1412a323 Mon Sep 17 00:00:00 2001 From: Raj Kamal Singh <1133322+rkssisodiya@users.noreply.github.com> Date: Fri, 4 Aug 2023 12:04:54 +0530 Subject: [PATCH] fix: handle prevPipelineData being undefined in PipelineExpandView footer (#3264) Co-authored-by: Palash Gupta --- .../PipelinePage/PipelineListsView/PipelineExpandView.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/container/PipelinePage/PipelineListsView/PipelineExpandView.tsx b/frontend/src/container/PipelinePage/PipelineListsView/PipelineExpandView.tsx index 89dbc4d87d..39dc60b2f7 100644 --- a/frontend/src/container/PipelinePage/PipelineListsView/PipelineExpandView.tsx +++ b/frontend/src/container/PipelinePage/PipelineListsView/PipelineExpandView.tsx @@ -193,7 +193,8 @@ function PipelineExpandView({ }, [setActionType]); const footer = useCallback((): JSX.Element | undefined => { - if (prevPipelineData.length === 0 || isEditingActionMode) { + const prevPipelinesCount = prevPipelineData?.length || 0; + if (prevPipelinesCount === 0 || isEditingActionMode) { return (