mirror of
https://github.com/discourse/discourse.git
synced 2025-02-22 04:07:27 +00: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() {
|
async subscribe() {
|
||||||
this.presenceChannel = this.presence.getChannel(this.channelName);
|
this.presenceChannel = this.presence.getChannel(this.channelName);
|
||||||
await this.presenceChannel.subscribe();
|
await this.presenceChannel.subscribe();
|
||||||
this.users = this.presenceChannel.users;
|
this.users = this.presenceChannel.users || [];
|
||||||
this.presenceChannel.on("change", this.handlePresenceChange);
|
this.presenceChannel.on("change", this.handlePresenceChange);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user