summaryrefslogtreecommitdiffstats
path: root/web/react/components
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/components')
-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;