[deploy] Fix connect edge cases (#7352)
This commit is contained in:
parent
2d978696c4
commit
13537fb8d4
2 changed files with 6 additions and 1 deletions
|
|
@ -82,7 +82,9 @@ export default class Chat extends Component {
|
|||
memberFilterQuery: null,
|
||||
rerenderIfUnchangedCheck: null,
|
||||
};
|
||||
getAllMessages(chatOptions.activeChannelId, 0, this.receiveAllMessages);
|
||||
if (chatOptions.activeChannelId) {
|
||||
getAllMessages(chatOptions.activeChannelId, 0, this.receiveAllMessages);
|
||||
}
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
|
|
|
|||
|
|
@ -42,6 +42,9 @@ class UnopenedChannelNotice extends Component {
|
|||
const number = document.getElementById('connect-number');
|
||||
this.setState({ unopenedChannels });
|
||||
if (unopenedChannels.length > 0) {
|
||||
if (unopenedChannels[0].adjusted_slug === "@"+JSON.parse(window.currentUser).username) {
|
||||
return;
|
||||
}
|
||||
number.classList.remove('hidden');
|
||||
number.innerHTML = unopenedChannels.length;
|
||||
document.getElementById('connect-link').href = '/connect/' + unopenedChannels[0].adjusted_slug;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue