diff options
author | 2021-09-14 19:58:52 +0200 | |
---|---|---|
committer | 2021-09-14 19:58:52 +0200 | |
commit | 95df3522a15631abc51a4295cae0ea401a8d4e1e (patch) | |
tree | e5eb0f368c947683f01458e912f21756fb0d99cb /src/components/ui/ImageUpload.js | |
parent | docs: add sad270 as a contributor for bug, userTesting [skip ci] (#1941) (diff) | |
download | ferdium-app-95df3522a15631abc51a4295cae0ea401a8d4e1e.tar.gz ferdium-app-95df3522a15631abc51a4295cae0ea401a8d4e1e.tar.zst ferdium-app-95df3522a15631abc51a4295cae0ea401a8d4e1e.zip |
feat: add eslint-plugin-unicorn (#1936)
Diffstat (limited to 'src/components/ui/ImageUpload.js')
-rw-r--r-- | src/components/ui/ImageUpload.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/components/ui/ImageUpload.js b/src/components/ui/ImageUpload.js index 8ea31ca40..49aff389b 100644 --- a/src/components/ui/ImageUpload.js +++ b/src/components/ui/ImageUpload.js | |||
@@ -30,14 +30,14 @@ class ImageUpload extends Component { | |||
30 | onDrop(acceptedFiles) { | 30 | onDrop(acceptedFiles) { |
31 | const { field } = this.props; | 31 | const { field } = this.props; |
32 | 32 | ||
33 | acceptedFiles.forEach(file => { | 33 | for (const file of acceptedFiles) { |
34 | const imgPath = isWindows ? file.path.replace(/\\/g, '/') : file.path; | 34 | const imgPath = isWindows ? file.path.replace(/\\/g, '/') : file.path; |
35 | this.setState({ | 35 | this.setState({ |
36 | path: imgPath, | 36 | path: imgPath, |
37 | }); | 37 | }); |
38 | 38 | ||
39 | this.props.field.onDrop(file); | 39 | this.props.field.onDrop(file); |
40 | }); | 40 | } |
41 | 41 | ||
42 | field.set(''); | 42 | field.set(''); |
43 | } | 43 | } |