Преглед изворни кода

@uppy/aws-s3-multipart: fix `TypeError` (#4748)

When chunks have already been uploaded, they are removed from memory.
If the user resume an upload whose first chunk has been uploaded, they
were getting a `TypeError` back.
Antoine du Hamel пре 1 година
родитељ
комит
91b7ca370e
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      packages/@uppy/aws-s3-multipart/src/index.js

+ 1 - 1
packages/@uppy/aws-s3-multipart/src/index.js

@@ -320,7 +320,7 @@ class HTTPCommunicationQueue {
 
   async resumeUploadFile (file, chunks, signal) {
     throwIfAborted(signal)
-    if (chunks.length === 1 && !chunks[0].shouldUseMultipart) {
+    if (chunks.length === 1 && chunks[0] != null && !chunks[0].shouldUseMultipart) {
       return this.#nonMultipartUpload(file, chunks[0], signal)
     }
     const { uploadId, key } = await this.getUploadId(file, signal)