Skip to content

Commit 3d1ad0f

Browse files
committed
fix: check if existing deployment bucket is exist but empty
1 parent d02ea0a commit 3d1ad0f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/plugins/aws/deploy/lib/check-for-changes.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ module.exports = {
7070
);
7171
}
7272
})();
73-
const objects = result.Contents.filter(({ Key: key }) =>
73+
const objects = result?.Contents?.filter(({ Key: key }) =>
7474
isDeploymentDirToken(key.split('/')[3])
7575
);
76-
if (!objects.length) return [];
76+
if (!objects?.length) return [];
7777

7878
const ordered = _.orderBy(objects, ['Key'], ['desc']);
7979

0 commit comments

Comments
 (0)