From 18634ffe503701bac3ee502958d85f53327f1bde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Mon, 24 Aug 2015 14:16:13 +0200 Subject: [PATCH] fix additional files button bug --- js/components/ascribe_uploader/react_s3_fine_uploader.js | 6 ++++-- .../cyland/ascribe_forms/cyland_additional_data_form.js | 3 +-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/js/components/ascribe_uploader/react_s3_fine_uploader.js b/js/components/ascribe_uploader/react_s3_fine_uploader.js index a19a2cef..8ecaf40b 100644 --- a/js/components/ascribe_uploader/react_s3_fine_uploader.js +++ b/js/components/ascribe_uploader/react_s3_fine_uploader.js @@ -709,8 +709,10 @@ var ReactS3FineUploader = React.createClass({ // if we're not hashing the files locally, we're just going to hand them over to fineuploader // to upload them to the server } else { - this.state.uploader.addFiles(files); - this.synchronizeFileLists(files); + if(files.length > 0) { + this.state.uploader.addFiles(files); + this.synchronizeFileLists(files); + } } }, diff --git a/js/components/whitelabel/wallet/components/cyland/ascribe_forms/cyland_additional_data_form.js b/js/components/whitelabel/wallet/components/cyland/ascribe_forms/cyland_additional_data_form.js index c8dd7f2c..f7946be5 100644 --- a/js/components/whitelabel/wallet/components/cyland/ascribe_forms/cyland_additional_data_form.js +++ b/js/components/whitelabel/wallet/components/cyland/ascribe_forms/cyland_additional_data_form.js @@ -61,10 +61,9 @@ let CylandAdditionalDataForm = React.createClass({ }, isReadyForFormSubmission(files) { - let uploadedFiles = files.filter((file) => file.status === 'upload successful'); let uploadingFiles = files.filter((file) => file.status === 'submitting'); - if (uploadedFiles.length > 0 && uploadingFiles.length === 0) { + if (uploadingFiles.length === 0) { return true; } else { return false;