diff options
author | Christopher Speller <crspeller@gmail.com> | 2016-11-24 09:08:46 -0500 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-11-24 09:08:46 -0500 |
commit | c96ecae6da31aceabf29586cde872876b81d11d9 (patch) | |
tree | 94df09df540da846bb4c6ed50e8bd7879cff63ba /webapp/components/post_view/post_view_cache.jsx | |
parent | b212acf312ad640455fa715427ac19e6930dc61d (diff) | |
parent | 36f62c9e82350f58c902f64a5d3304872431ad41 (diff) | |
download | chat-c96ecae6da31aceabf29586cde872876b81d11d9.tar.gz chat-c96ecae6da31aceabf29586cde872876b81d11d9.tar.bz2 chat-c96ecae6da31aceabf29586cde872876b81d11d9.zip |
Merge branch 'release-3.5'
Diffstat (limited to 'webapp/components/post_view/post_view_cache.jsx')
-rw-r--r-- | webapp/components/post_view/post_view_cache.jsx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/webapp/components/post_view/post_view_cache.jsx b/webapp/components/post_view/post_view_cache.jsx index c1b278c35..3b6123b09 100644 --- a/webapp/components/post_view/post_view_cache.jsx +++ b/webapp/components/post_view/post_view_cache.jsx @@ -17,11 +17,12 @@ export default class PostViewCache extends React.Component { this.onChannelChange = this.onChannelChange.bind(this); + const currentChannelId = ChannelStore.getCurrentId(); const channel = ChannelStore.getCurrent(); this.state = { - currentChannelId: channel.id, - channels: [channel] + currentChannelId, + channels: channel ? [channel] : [] }; } @@ -40,7 +41,7 @@ export default class PostViewCache extends React.Component { const channels = Object.assign([], this.state.channels); const currentChannel = ChannelStore.getCurrent(); - if (currentChannel == null) { + if (!currentChannel) { return; } |