ソースを参照

Fix accidental mutation on postprocessing completion

Renée Kooi 8 年 前
コミット
12632fe088
1 ファイル変更3 行追加1 行削除
  1. 3 1
      src/core/Core.js

+ 3 - 1
src/core/Core.js

@@ -389,7 +389,9 @@ class Uppy {
     })
     })
     this.on('core:postprocess-complete', (fileID) => {
     this.on('core:postprocess-complete', (fileID) => {
       const files = Object.assign({}, this.getState().files)
       const files = Object.assign({}, this.getState().files)
-      files[fileID] = Object.assign({}, files[fileID])
+      files[fileID] = Object.assign({}, files[fileID], {
+        progress: Object.assign({}, files[fileID].progress)
+      })
       delete files[fileID].progress.postprocess
       delete files[fileID].progress.postprocess
       // TODO should we set some kind of `fullyComplete` property on the file object
       // TODO should we set some kind of `fullyComplete` property on the file object
       // so it's easier to see that the file is upload…fully complete…rather than
       // so it's easier to see that the file is upload…fully complete…rather than