Browse Source

Check for file existance

bartvde 6 years ago
parent
commit
f7486543a0
1 changed files with 3 additions and 0 deletions
  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: [