From 318670253ab9ae6a902941d892229a3c88e10717 Mon Sep 17 00:00:00 2001
From: Evgeniy <gig177@yandex.ru>
Date: Wed, 1 Feb 2017 04:41:25 +0300
Subject: fix cloning channels (#5242)

* fix cloning channels

* fix code-style
---
 webapp/components/sidebar.jsx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'webapp/components/sidebar.jsx')

diff --git a/webapp/components/sidebar.jsx b/webapp/components/sidebar.jsx
index 9adc463be..08962682d 100644
--- a/webapp/components/sidebar.jsx
+++ b/webapp/components/sidebar.jsx
@@ -109,7 +109,9 @@ export default class Sidebar extends React.Component {
         const teamMembers = TeamStore.getMyTeamMembers();
         const currentChannelId = ChannelStore.getCurrentId();
         const tutorialStep = PreferenceStore.getInt(Preferences.TUTORIAL_STEP, UserStore.getCurrentId(), 999);
-        const channelList = ChannelUtils.buildDisplayableChannelList(Object.assign([], ChannelStore.getAll()));
+
+        const allChannels = ChannelStore.getAll().map((channel) => Object.assign({}, channel));
+        const channelList = ChannelUtils.buildDisplayableChannelList(allChannels);
 
         return {
             activeId: currentChannelId,
-- 
cgit v1.2.3-1-g7c22

