From 1afd2f1ac17745887ec4c993e01b95c8e118eb5b Mon Sep 17 00:00:00 2001
From: Christopher Speller <crspeller@gmail.com>
Date: Wed, 4 Nov 2015 12:23:55 -0500
Subject: Fixed leaving channels issue

---
 web/react/components/posts_view_container.jsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'web/react/components/posts_view_container.jsx')

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;
-- 
cgit v1.2.3-1-g7c22

