From c5525d4b38c6ccbbd0ac7c55383de3a97c846d57 Mon Sep 17 00:00:00 2001 From: Nicolas Merget <104347736+nmerget@users.noreply.github.com> Date: Tue, 5 Dec 2023 13:54:48 +0100 Subject: [PATCH] fix: asset upload (#1962) * fix: asset upload * test: upload-asset.js * test: upload-asset.js * test: upload-asset.js * test: upload-asset.js * test: upload-asset.js --- .github/scripts/release/upload-asset.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/scripts/release/upload-asset.js b/.github/scripts/release/upload-asset.js index 224df1156c6..98ebe7e607f 100644 --- a/.github/scripts/release/upload-asset.js +++ b/.github/scripts/release/upload-asset.js @@ -18,9 +18,9 @@ const uploadAsset = async ({ release_id }); - const foundAsset = uploadRelease?.assets?.find( - (asset) => asset.name === assetName - ); + const { assets = [] } = uploadRelease.data; + + const foundAsset = assets?.find((asset) => asset.name === assetName); if (foundAsset) { await github.rest.repos.deleteReleaseAsset({