Fixed errors when joining a channel that doesn't exist yet
Этот коммит содержится в:
@@ -57,7 +57,11 @@ export default class PopoverListMembers extends React.Component {
|
|||||||
const members = this.props.members;
|
const members = this.props.members;
|
||||||
const teamMembers = UserStore.getProfilesUsernameMap();
|
const teamMembers = UserStore.getProfilesUsernameMap();
|
||||||
const currentUserId = UserStore.getCurrentId();
|
const currentUserId = UserStore.getCurrentId();
|
||||||
const ch = ChannelStore.getCurrent();
|
const ch = ChannelStore.get(this.props.channelId);
|
||||||
|
|
||||||
|
if (!ch) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
if (members && teamMembers) {
|
if (members && teamMembers) {
|
||||||
members.sort((a, b) => {
|
members.sort((a, b) => {
|
||||||
|
|||||||
@@ -531,8 +531,8 @@ PostStore.dispatchToken = AppDispatcher.register((payload) => {
|
|||||||
switch (action.type) {
|
switch (action.type) {
|
||||||
case ActionTypes.RECEIVED_POSTS: {
|
case ActionTypes.RECEIVED_POSTS: {
|
||||||
const id = PostStore.currentFocusedPostId == null ? action.id : PostStore.currentFocusedPostId;
|
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.storePosts(id, makePostListNonNull(action.post_list));
|
||||||
|
PostStore.checkBounds(id, action.numRequested, makePostListNonNull(action.post_list), action.before);
|
||||||
PostStore.emitChange();
|
PostStore.emitChange();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user