Skip to content

Commit faeb70b

Browse files
authored
Merge pull request #20 from SoftwareBrothers/fix/multiple-files-bucket
[FIX] Fix multiple files upload
2 parents c23e1fb + c303e21 commit faeb70b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/features/upload-file/utils/fill-record-with-path.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ export const fillRecordWithPath = async (
1717
if (multiple && key && key.length) {
1818
filePath = await Promise.all(key.map(async (singleKey, index) => (
1919
provider.path(
20-
singleKey, storedBucket[index] || provider.bucket, context,
20+
singleKey, storedBucket?.[index] ?? provider.bucket, context,
2121
)
2222
)))
2323
} else if (!multiple && key) {
2424
filePath = await provider.path(
25-
key, storedBucket || provider.bucket, context,
25+
key, storedBucket ?? provider.bucket, context,
2626
)
2727
}
2828

0 commit comments

Comments
 (0)