diff options
author | Joram Wilander <jwawilander@gmail.com> | 2016-03-30 11:16:49 -0400 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2016-03-30 11:16:49 -0400 |
commit | 52074b70a448841d34eec8a4920ab4d35a028d09 (patch) | |
tree | f04a888e3f515b52e02707f328f1c2251b24a943 /webapp/components | |
parent | d2ddddc4aaf1e085c7f02d86d957fe571c70978a (diff) | |
parent | b6d6153afb07bc18ef162d063c0a413f80a59f52 (diff) | |
download | chat-52074b70a448841d34eec8a4920ab4d35a028d09.tar.gz chat-52074b70a448841d34eec8a4920ab4d35a028d09.tar.bz2 chat-52074b70a448841d34eec8a4920ab4d35a028d09.zip |
Merge pull request #2575 from hmhealey/plt2480
PLT-2478/PLT-2480 Fixing direct channels in sidebar
Diffstat (limited to 'webapp/components')
-rw-r--r-- | webapp/components/sidebar.jsx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/webapp/components/sidebar.jsx b/webapp/components/sidebar.jsx index 45bca7212..b22d3ec34 100644 --- a/webapp/components/sidebar.jsx +++ b/webapp/components/sidebar.jsx @@ -238,7 +238,9 @@ export default class Sidebar extends React.Component { }); } - handleLeaveDirectChannel(channel) { + handleLeaveDirectChannel(e, channel) { + e.preventDefault(); + if (!this.isLeaving.get(channel.id)) { this.isLeaving.set(channel.id, true); @@ -258,7 +260,7 @@ export default class Sidebar extends React.Component { } if (channel.id === this.state.activeId) { - browserHistory.push(TeamStore.getCurrentTeamUrl() + '/channels/town-square'); + browserHistory.push('/' + this.state.currentTeam.name + '/channels/town-square'); } } @@ -422,7 +424,7 @@ export default class Sidebar extends React.Component { overlay={removeTooltip} > <span - onClick={() => handleClose(channel)} + onClick={(e) => handleClose(e, channel)} className='btn-close' > {'×'} |