傅行帆 5 лет назад
Родитель
Сommit
9302d79ca8
1 измененных файлов: 1 добавлений и 1 удалений
  1. 1
    1
      src/components/uploadImage/ImageUpload.jsx

+ 1
- 1
src/components/uploadImage/ImageUpload.jsx Просмотреть файл

@@ -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
     }