ソースを参照

Merge pull request #981 from bartvde/fix-on-part-complete

Check for file existance
Artur Paikin 6 年 前
コミット
76ea7fcb9f
1 ファイル変更3 行追加0 行削除
  1. 3 0
      packages/@uppy/aws-s3-multipart/src/index.js

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

@@ -183,6 +183,9 @@ module.exports = class AwsS3Multipart extends Plugin {
         onPartComplete: (part) => {
           // Store completed parts in state.
           const cFile = this.uppy.getFile(file.id)
+          if (!cFile) {
+            return;
+          }
           this.uppy.setFileState(file.id, {
             s3Multipart: Object.assign({}, cFile.s3Multipart, {
               parts: [