summaryrefslogtreecommitdiffstats
path: root/webapp/components/file_attachment_list/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components/file_attachment_list/index.js')
-rw-r--r--webapp/components/file_attachment_list/index.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/webapp/components/file_attachment_list/index.js b/webapp/components/file_attachment_list/index.js
index b9016defb..1e901114b 100644
--- a/webapp/components/file_attachment_list/index.js
+++ b/webapp/components/file_attachment_list/index.js
@@ -11,7 +11,8 @@ import FileAttachmentList from './file_attachment_list.jsx';
function makeMapStateToProps() {
const selectFilesForPost = makeGetFilesForPost();
return function mapStateToProps(state, ownProps) {
- const fileInfos = selectFilesForPost(state, ownProps.post);
+ const postId = ownProps.post ? ownProps.post.id : '';
+ const fileInfos = selectFilesForPost(state, postId);
let fileCount = 0;
if (ownProps.post.file_ids) {