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:
Joffrey JAFFEUX 2023-05-09 23:52:46 +02:00 committed by GitHub
parent c6864f8f0f
commit 44e650d175
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}