diff --git a/dist/index.js b/dist/index.js index 5b7e89a6..fa566af2 100755 --- a/dist/index.js +++ b/dist/index.js @@ -22901,6 +22901,7 @@ async function archiveArtifacts(workflowInformationArray) { .map(promiseResult => promiseResult.value || promiseResult.reason) .filter( uploadResponse => + uploadResponse && uploadResponse.artifactItems && uploadResponse.artifactItems.length > 0 ); @@ -22912,7 +22913,9 @@ async function archiveArtifacts(workflowInformationArray) { .map(promiseResult => promiseResult.reason) .filter( uploadResponse => - uploadResponse.failedItems && uploadResponse.failedItems.length > 0 + uploadResponse && + uploadResponse.failedItems && + uploadResponse.failedItems.length > 0 ); const failedFiles = failureUploadResponses.flatMap( uploadResponse => uploadResponse.failedItems diff --git a/src/lib/build-chain-flow.js b/src/lib/build-chain-flow.js index d5c562c9..18fed0bd 100644 --- a/src/lib/build-chain-flow.js +++ b/src/lib/build-chain-flow.js @@ -121,6 +121,7 @@ async function archiveArtifacts(workflowInformationArray) { .map(promiseResult => promiseResult.value || promiseResult.reason) .filter( uploadResponse => + uploadResponse && uploadResponse.artifactItems && uploadResponse.artifactItems.length > 0 ); @@ -132,7 +133,9 @@ async function archiveArtifacts(workflowInformationArray) { .map(promiseResult => promiseResult.reason) .filter( uploadResponse => - uploadResponse.failedItems && uploadResponse.failedItems.length > 0 + uploadResponse && + uploadResponse.failedItems && + uploadResponse.failedItems.length > 0 ); const failedFiles = failureUploadResponses.flatMap( uploadResponse => uploadResponse.failedItems