summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--webapp/components/popover_list_members.jsx6
-rw-r--r--webapp/stores/post_store.jsx2
2 files changed, 6 insertions, 2 deletions
diff --git a/webapp/components/popover_list_members.jsx b/webapp/components/popover_list_members.jsx
index cd583e4c3..f21b8ee1c 100644
--- a/webapp/components/popover_list_members.jsx
+++ b/webapp/components/popover_list_members.jsx
@@ -57,7 +57,11 @@ export default class PopoverListMembers extends React.Component {
const members = this.props.members;
const teamMembers = UserStore.getProfilesUsernameMap();
const currentUserId = UserStore.getCurrentId();
- const ch = ChannelStore.getCurrent();
+ const ch = ChannelStore.get(this.props.channelId);
+
+ if (!ch) {
+ return null;
+ }
if (members && teamMembers) {
members.sort((a, b) => {
diff --git a/webapp/stores/post_store.jsx b/webapp/stores/post_store.jsx
index 36393f5cd..f328ca306 100644
--- a/webapp/stores/post_store.jsx
+++ b/webapp/stores/post_store.jsx
@@ -531,8 +531,8 @@ PostStore.dispatchToken = AppDispatcher.register((payload) => {
switch (action.type) {
case ActionTypes.RECEIVED_POSTS: {
const id = PostStore.currentFocusedPostId == null ? action.id : PostStore.currentFocusedPostId;
- PostStore.checkBounds(id, action.numRequested, makePostListNonNull(action.post_list), action.before);
PostStore.storePosts(id, makePostListNonNull(action.post_list));
+ PostStore.checkBounds(id, action.numRequested, makePostListNonNull(action.post_list), action.before);
PostStore.emitChange();
break;
}