From 5ae701d133f713363e52b9cc6aa01579c81ebab4 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Thu, 20 Jul 2017 08:56:23 -0400 Subject: Update mattermost-redux to master (#6982) --- webapp/components/file_attachment_list/index.js | 3 ++- .../commented_on_files_message/commented_on_files_message.jsx | 2 +- webapp/components/post_view/commented_on_files_message/index.js | 2 +- webapp/package.json | 2 +- webapp/yarn.lock | 4 ++-- 5 files changed, 7 insertions(+), 6 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) { diff --git a/webapp/components/post_view/commented_on_files_message/commented_on_files_message.jsx b/webapp/components/post_view/commented_on_files_message/commented_on_files_message.jsx index a8c6845c8..1755d68e4 100644 --- a/webapp/components/post_view/commented_on_files_message/commented_on_files_message.jsx +++ b/webapp/components/post_view/commented_on_files_message/commented_on_files_message.jsx @@ -45,7 +45,7 @@ export default class CommentedOnFilesMessage extends React.PureComponent { id='post_body.plusMore' defaultMessage=' plus {count, number} other {count, plural, one {file} other {files}}' values={{ - count: this.props.fileInfos.length + count: this.props.fileInfos.length - 1 }} /> ); diff --git a/webapp/components/post_view/commented_on_files_message/index.js b/webapp/components/post_view/commented_on_files_message/index.js index fd6aa7193..d55cff16b 100644 --- a/webapp/components/post_view/commented_on_files_message/index.js +++ b/webapp/components/post_view/commented_on_files_message/index.js @@ -15,7 +15,7 @@ function makeMapStateToProps() { return function mapStateToProps(state, ownProps) { let fileInfos; if (ownProps.parentPostId) { - fileInfos = selectFileInfosForPost(state, {id: ownProps.parentPostId}); + fileInfos = selectFileInfosForPost(state, ownProps.parentPostId); } return { diff --git a/webapp/package.json b/webapp/package.json index 346354865..00a85b614 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -25,7 +25,7 @@ "localforage": "1.5.0", "marked": "mattermost/marked#c0b5f4a651b0af63e974522b20b93b7999490c53", "match-at": "0.1.0", - "mattermost-redux": "mattermost/mattermost-redux#webapp-4.0", + "mattermost-redux": "mattermost/mattermost-redux#master", "object-assign": "4.1.1", "pdfjs-dist": "1.8.557", "perfect-scrollbar": "0.7.1", diff --git a/webapp/yarn.lock b/webapp/yarn.lock index 7bfcd56e0..a2e48a39d 100644 --- a/webapp/yarn.lock +++ b/webapp/yarn.lock @@ -5088,9 +5088,9 @@ math-expression-evaluator@^1.2.14: version "1.2.16" resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.16.tgz#b357fa1ca9faefb8e48d10c14ef2bcb2d9f0a7c9" -mattermost-redux@mattermost/mattermost-redux#webapp-4.0: +mattermost-redux@mattermost/mattermost-redux#master: version "0.0.1" - resolved "https://codeload.github.com/mattermost/mattermost-redux/tar.gz/ea67cb97d1e34b251e13a356583223284f544aa5" + resolved "https://codeload.github.com/mattermost/mattermost-redux/tar.gz/f8d106e6fde0d8633bf5d13c1ca1aaec61b0b8bb" dependencies: deep-equal "1.0.1" harmony-reflect "1.5.1" -- cgit v1.2.3-1-g7c22