Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

message_scroll: Don't process msg scroll events in non-message views.

Aman Agrawala44a4342b990
diff --git a/web/src/message_scroll.js b/web/src/message_scroll.js
index 44884885e02..9e5dfdada9d 100644
--- a/web/src/message_scroll.js
+++ b/web/src/message_scroll.js
@@ -133,8 +133,12 @@ export function initialize() {
$(document).on(
"scroll",
_.throttle(() => {
+ if (message_lists.current === undefined) {
+ return;
+ }
+
unread_ops.process_visible();
- message_lists.current?.view.update_sticky_recipient_headers();
+ message_lists.current.view.update_sticky_recipient_headers();
scroll_finish();
}, 50),
);