mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Fixed errors when joining a channel that doesn't exist yet
This commit is contained in:
@@ -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) => {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user