Skip to content

A platform for community discussion. Free, open, simple.

FIX: prevents fast channel switching to cause an error (#21461)

Joffrey JAFFEUX44e650d175d1
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-replying-indicator.js b/plugins/chat/assets/javascripts/discourse/components/chat-replying-indicator.js
index cfd21404eae..056c1c64a3a 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-replying-indicator.js
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-replying-indicator.js
@@ -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);
}