summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2015-11-04 13:56:33 -0800
committerCorey Hulen <corey@hulen.com>2015-11-04 13:56:33 -0800
commita88ce12f581b463119afb586622773da1d535eb4 (patch)
tree8119d9405a87cd58675c36a82b8bf9dd34af29f7 /web
parent8b8419d5ba70a3d6f8c95853ba5102f43f46599d (diff)
parent1afd2f1ac17745887ec4c993e01b95c8e118eb5b (diff)
downloadchat-a88ce12f581b463119afb586622773da1d535eb4.tar.gz
chat-a88ce12f581b463119afb586622773da1d535eb4.tar.bz2
chat-a88ce12f581b463119afb586622773da1d535eb4.zip
Merge pull request #1304 from mattermost/leave-channel-fix
Fixed leaving channels issue
Diffstat (limited to 'web')
-rw-r--r--web/react/components/posts_view_container.jsx6
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;