傅行帆 5 anni fa
parent
commit
9302d79ca8
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1
    1
      src/components/uploadImage/ImageUpload.jsx

+ 1
- 1
src/components/uploadImage/ImageUpload.jsx Vedi File

@@ -35,7 +35,7 @@ class ImageUpload extends React.Component {
35 35
     const { status, response } = file
36 36
     this.setState({ fileList, loading: status === "uploading" })
37 37
 
38
-    if (typeof this.props.onChange === 'function') {
38
+    if (typeof this.props.onChange === 'function' && status != "uploading") {
39 39
       const image = status === 'done' ? response : undefined
40 40
       this.props.onChange(image);
41 41
     }