diff options
author | enahum <nahumhbl@gmail.com> | 2016-11-29 12:15:46 -0300 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-11-29 10:15:46 -0500 |
commit | 702c4cb12146d4b3d18807d56e013da3aed15836 (patch) | |
tree | 9168eb7ca5e86986c98d90c053c53bdedd0e6f2e /webapp/components/file_attachment_list.jsx | |
parent | 02d581c1599c5d50cc507bd2633f1e3c34b1cc84 (diff) | |
download | chat-702c4cb12146d4b3d18807d56e013da3aed15836.tar.gz chat-702c4cb12146d4b3d18807d56e013da3aed15836.tar.bz2 chat-702c4cb12146d4b3d18807d56e013da3aed15836.zip |
Fix more react warnings & fix saving theme (#4667)
Diffstat (limited to 'webapp/components/file_attachment_list.jsx')
-rw-r--r-- | webapp/components/file_attachment_list.jsx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/webapp/components/file_attachment_list.jsx b/webapp/components/file_attachment_list.jsx index 3df4684be..3d39d8709 100644 --- a/webapp/components/file_attachment_list.jsx +++ b/webapp/components/file_attachment_list.jsx @@ -39,7 +39,12 @@ export default class FileAttachmentList extends React.Component { } else if (this.props.fileCount > 0) { for (let i = 0; i < Math.min(this.props.fileCount, Constants.MAX_DISPLAY_FILES); i++) { // Add a placeholder to avoid pop-in once we get the file infos for this post - postFiles.push(<div className='post-image__column post-image__column--placeholder'/>); + postFiles.push( + <div + key={`fileCount-${i}`} + className='post-image__column post-image__column--placeholder' + /> + ); } } @@ -61,6 +66,6 @@ export default class FileAttachmentList extends React.Component { FileAttachmentList.propTypes = { fileCount: React.PropTypes.number.isRequired, - fileInfos: React.PropTypes.arrayOf(React.PropTypes.object).isRequired, + fileInfos: React.PropTypes.arrayOf(React.PropTypes.object), compactDisplay: React.PropTypes.bool }; |