Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Tobias Bocanegra <[email protected]>
  • Loading branch information
maxakuru and tripodsan authored Jul 16, 2024
1 parent 6f4afe4 commit 5fb2264
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/helix-shared-storage/src/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ class Bucket {

try {
if (opts.addMetadata) {
const meta = await this.metadata(key);
const meta = await this.metadata(key) ?? {};
input.Metadata = { ...meta, ...opts.addMetadata };
input.MetadataDirective = 'REPLACE';
}
Expand Down Expand Up @@ -465,7 +465,7 @@ class Bucket {
};
try {
if (opts.addMetadata) {
const meta = await this.metadata(task.src);
const meta = await this.metadata(task.src) || {};
input.Metadata = { ...meta, ...opts.addMetadata };
input.MetadataDirective = 'REPLACE';
}
Expand Down

0 comments on commit 5fb2264

Please sign in to comment.