From 33b957ed1a8a44d4bed0f9c674d5602bad5028ea Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Mon, 5 Oct 2015 09:58:42 -0400 Subject: Disabling complexity warning. Allowing non-nested ternary. Upgrading ESList. Adding new ESLint rules. Fixing new ESLint errors. --- web/react/components/post_list.jsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'web/react/components/post_list.jsx') diff --git a/web/react/components/post_list.jsx b/web/react/components/post_list.jsx index a31967257..a534e5789 100644 --- a/web/react/components/post_list.jsx +++ b/web/react/components/post_list.jsx @@ -37,9 +37,11 @@ export default class PostList extends React.Component { this.deactivate = this.deactivate.bind(this); this.resize = this.resize.bind(this); - this.state = this.getStateFromStores(props.channelId); - this.state.numToDisplay = Constants.POST_CHUNK_SIZE; - this.state.isFirstLoadComplete = false; + const state = this.getStateFromStores(props.channelId); + state.numToDisplay = Constants.POST_CHUNK_SIZE; + state.isFirstLoadComplete = false; + + this.state = state; } getStateFromStores(id) { var postList = PostStore.getPosts(id); @@ -449,10 +451,10 @@ export default class PostList extends React.Component { } var createMessage; - if (creatorName !== '') { - createMessage = (This is the start of the {uiName} {uiType}, created by {creatorName} on {utils.displayDate(channel.create_at)}); - } else { + if (creatorName === '') { createMessage = 'This is the start of the ' + uiName + ' ' + uiType + ', created on ' + utils.displayDate(channel.create_at) + '.'; + } else { + createMessage = (This is the start of the {uiName} {uiType}, created by {creatorName} on {utils.displayDate(channel.create_at)}); } return ( -- cgit v1.2.3-1-g7c22