diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-11-04 12:23:55 -0500 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-11-04 12:23:55 -0500 |
commit | 1afd2f1ac17745887ec4c993e01b95c8e118eb5b (patch) | |
tree | f69c6eb8a26b11aa54c6ee51652c918c87feb913 /web/react | |
parent | ebce34190a4a6973bf2646aa8392e86724dad496 (diff) | |
download | chat-1afd2f1ac17745887ec4c993e01b95c8e118eb5b.tar.gz chat-1afd2f1ac17745887ec4c993e01b95c8e118eb5b.tar.bz2 chat-1afd2f1ac17745887ec4c993e01b95c8e118eb5b.zip |
Fixed leaving channels issue
Diffstat (limited to 'web/react')
-rw-r--r-- | web/react/components/posts_view_container.jsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/web/react/components/posts_view_container.jsx b/web/react/components/posts_view_container.jsx index 7671ca01d..301057990 100644 --- a/web/react/components/posts_view_container.jsx +++ b/web/react/components/posts_view_container.jsx @@ -81,7 +81,7 @@ export default class PostsViewContainer extends React.Component { } } onChannelChange() { - const postLists = Object.assign({}, this.state.postLists); + const postLists = this.state.postLists.slice(); const channels = this.state.channels.slice(); const channelId = ChannelStore.getCurrentId(); @@ -112,7 +112,7 @@ export default class PostsViewContainer extends React.Component { postLists}); } onChannelLeave(id) { - const postLists = Object.assign({}, this.state.postLists); + const postLists = this.state.postLists.slice(); const channels = this.state.channels.slice(); const index = channels.indexOf(id); if (index !== -1) { @@ -123,7 +123,7 @@ export default class PostsViewContainer extends React.Component { } onPostsChange() { const channels = this.state.channels; - const postLists = Object.assign({}, this.state.postLists); + const postLists = this.state.postLists.slice(); const newPostsView = this.getChannelPosts(channels[this.state.currentChannelIndex]); postLists[this.state.currentChannelIndex] = newPostsView; |