fix: handle prevPipelineData being undefined in PipelineExpandView footer (#3264)

Co-authored-by: Palash Gupta <palashgdev@gmail.com>
This commit is contained in:
Raj Kamal Singh 2023-08-04 12:04:54 +05:30 committed by GitHub
parent ff392ba883
commit e61b0a4d67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 (
<FooterButton type="link" onClick={addNewProcessorHandler}>
<PlusCircleOutlined />