Skip to content

Commit

Permalink
Fix reducer identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubkottnauer committed Sep 9, 2016
1 parent 0856301 commit 0452943
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "redux-file-upload",
"version": "0.0.12",
"version": "0.0.13",
"description": "Redux-friendly file upload made easy",
"main": "lib/index.js",
"author": "Blueberry",
Expand Down
10 changes: 5 additions & 5 deletions src/FileUpload.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,15 @@ export default class FileUpload extends Component {
const allowedFiles = !!allowedFileTypes ? await filterAllowedFiles(event, allowedFileTypes) : event;
const imageFiles = await filterImageFiles(allowedFiles);
const docFiles = await filterDocFiles(allowedFiles);
const reducerIdentificator = identifier || dropzoneId;
const id = identifier || dropzoneId;

if (!!imageFiles.length) {
addUploadingImages(dropzoneId, imageFiles);
uploadFiles(reducerIdentificator, url, imageFiles, 'image', data);
addUploadingImages(id, imageFiles);
uploadFiles(id, url, imageFiles, 'image', data);
}
if (!!docFiles.length) {
addUploadingDocs(dropzoneId, docFiles);
uploadFiles(reducerIdentificator, url, docFiles, 'document', data);
addUploadingDocs(id, docFiles);
uploadFiles(id, url, docFiles, 'document', data);
}
}

Expand Down

0 comments on commit 0452943

Please sign in to comment.