Skip to content

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

DEV: Avoid infinite calling of computeDatesSeparators() (#21616)

Andrei Prigorshnev20a7192b4ecd
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-channel.js b/plugins/chat/assets/javascripts/discourse/components/chat-channel.js
index d81ca7c79c7..e72257db9cb 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-channel.js
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-channel.js
@@ -870,7 +870,7 @@ export default class ChatLivePane extends Component {
computeDatesSeparators() {
cancel(this._laterComputeHandler);
this._computeDatesSeparators();
- this._laterComputeHandler = later(this, this.computeDatesSeparators, 100);
+ this._laterComputeHandler = later(this, this._computeDatesSeparators, 100);
}
// A more consistent way to scroll to the bottom when we are sure this is our goal