diff options
author | Reed Garmsen <rgarmsen2295@gmail.com> | 2015-08-12 08:30:03 -0700 |
---|---|---|
committer | Reed Garmsen <rgarmsen2295@gmail.com> | 2015-08-12 12:34:08 -0700 |
commit | 596e76d40418465c80fadb640450ee4d37bc4e1e (patch) | |
tree | 6466edaf53520938e71b0c8288ef6308359011d5 /web/react/components | |
parent | 6f091f0f6d17b74a5d87517ef35f89cd46e1bcb4 (diff) | |
download | chat-596e76d40418465c80fadb640450ee4d37bc4e1e.tar.gz chat-596e76d40418465c80fadb640450ee4d37bc4e1e.tar.bz2 chat-596e76d40418465c80fadb640450ee4d37bc4e1e.zip |
Fixed issue with uploading files from RHS when trying to upload after opening the RHS and then switching channels
Diffstat (limited to 'web/react/components')
-rw-r--r-- | web/react/components/file_upload.jsx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/web/react/components/file_upload.jsx b/web/react/components/file_upload.jsx index 05c883ffc..7918b42ec 100644 --- a/web/react/components/file_upload.jsx +++ b/web/react/components/file_upload.jsx @@ -14,7 +14,7 @@ module.exports = React.createClass({ var element = $(this.refs.fileInput.getDOMNode()); var files = element.prop('files'); - var channelId = ChannelStore.getCurrentId(); + var channelId = this.props.channelId || ChannelStore.getCurrentId(); this.props.onUploadError(null); @@ -192,14 +192,13 @@ module.exports = React.createClass({ continue; } - var channelId = ChannelStore.getCurrentId(); + var channelId = this.props.channelId || ChannelStore.getCurrentId(); // generate a unique id that can be used by other components to refer back to this file upload var clientId = utils.generateId(); var formData = new FormData(); formData.append('channel_id', channelId); - var d = new Date(); var hour; if (d.getHours() < 10) { |