From 952e7a93f977a11bd65c0477d478154e1faddc15 Mon Sep 17 00:00:00 2001 From: Reed Garmsen Date: Thu, 23 Jul 2015 10:01:19 -0700 Subject: Fixed issue with error message for uploading more than 5 files not appearing on OSX --- web/react/components/create_comment.jsx | 2 +- web/react/components/create_post.jsx | 2 +- web/react/components/file_upload.jsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'web') diff --git a/web/react/components/create_comment.jsx b/web/react/components/create_comment.jsx index 3f8e9ed2e..88c01c586 100644 --- a/web/react/components/create_comment.jsx +++ b/web/react/components/create_comment.jsx @@ -40,7 +40,7 @@ module.exports = React.createClass({ post.parent_id = this.props.parentId; post.filenames = this.state.previews; - this.setState({ submitting: true }); + this.setState({ submitting: true, limit_error: null }); client.createPost(post, ChannelStore.getCurrent(), function(data) { diff --git a/web/react/components/create_post.jsx b/web/react/components/create_post.jsx index 91d070958..b065dff83 100644 --- a/web/react/components/create_post.jsx +++ b/web/react/components/create_post.jsx @@ -45,7 +45,7 @@ module.exports = React.createClass({ return; } - this.setState({ submitting: true }); + this.setState({ submitting: true, limit_error: null }); var user_id = UserStore.getCurrentId(); diff --git a/web/react/components/file_upload.jsx b/web/react/components/file_upload.jsx index f2429f17e..aee089dbc 100644 --- a/web/react/components/file_upload.jsx +++ b/web/react/components/file_upload.jsx @@ -15,7 +15,7 @@ module.exports = React.createClass({ // This looks redundant, but must be done this way due to // setState being an asynchronous call var numFiles = 0; - for(var i = 0; i < files.length && i < Constants.MAX_UPLOAD_FILES; i++) { + for(var i = 0; i < files.length; i++) { if (files[i].size <= Constants.MAX_FILE_SIZE) { numFiles++; } -- cgit v1.2.3-1-g7c22