Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(@aws-amplify/storage) correctly handle empty S3 list results #5509

Merged
merged 4 commits into from Apr 24, 2020

Conversation

Amplifiyer
Copy link
Contributor

Issue #, if available: fixes #5323

Description of changes: The property Contents on ListObjectsOutput is undefined when there are no objects at the requested path. This PR adds the null/undefined check to correctly handle that use case.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@codecov
Copy link

codecov bot commented Apr 22, 2020

Codecov Report

Merging #5509 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #5509   +/-   ##
=======================================
  Coverage   72.92%   72.92%           
=======================================
  Files         197      197           
  Lines       11531    11533    +2     
  Branches     2173     2174    +1     
=======================================
+ Hits         8409     8411    +2     
  Misses       2971     2971           
  Partials      151      151           
Impacted Files Coverage Δ
packages/core/src/Platform/version.ts 100.00% <100.00%> (ø)
packages/storage/src/providers/AWSS3Provider.ts 87.23% <100.00%> (+0.13%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fd45012...54f28ae. Read the comment docs.

@Amplifiyer Amplifiyer self-assigned this Apr 23, 2020
Copy link
Contributor

@elorzafe elorzafe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks @Amplifiyer 🏅

@elorzafe elorzafe merged commit d6fcb6a into master Apr 24, 2020
@Amplifiyer Amplifiyer deleted the issue_5323 branch April 24, 2020 18:04
@github-actions
Copy link

This pull request has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Storage.list crash: TypeError: Cannot read property 'map' of undefined
2 participants