mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 11:06:32 +08:00
FIX: prevents fast channel switching to cause an error (#21461)
`this.users` would end up being nil and `this.users.filter` would generate an exception.
This commit is contained in:
parent
c6864f8f0f
commit
44e650d175
|
@ -22,7 +22,7 @@ export default class ChatReplyingIndicator extends Component {
|
|||
async subscribe() {
|
||||
this.presenceChannel = this.presence.getChannel(this.channelName);
|
||||
await this.presenceChannel.subscribe();
|
||||
this.users = this.presenceChannel.users;
|
||||
this.users = this.presenceChannel.users || [];
|
||||
this.presenceChannel.on("change", this.handlePresenceChange);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user