1
0
mirror of https://github.com/fazo96/ipfs-boards synced 2025-03-11 21:38:38 +01:00

refactored a little function

This commit is contained in:
Enrico Fasoli 2015-11-15 21:35:13 +01:00
parent 93e9b1a294
commit 23ffa38601

View File

@ -93,9 +93,7 @@ var PostList = React.createClass({
console.log('Initial POSTS',this.state.posts.length)
boards.getPostsInBoard(this.props.admin,this.props.board).on('post',(post,hash) => {
if(!this.isMounted()) return true
var posts = this.state.posts
posts.push(post)
this.setState({ posts })
this.setState({ posts: this.state.posts.concat(post) })
})
},
render: function(){