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.

ui_init: Unnest an if statement.

Anders Kaseorgdf9e40491dc7
diff --git a/static/js/ui_init.js b/static/js/ui_init.js
index 1802f3faab8..aa29d3d286c 100644
--- a/static/js/ui_init.js
+++ b/static/js/ui_init.js
@@ -70,10 +70,8 @@ exports.initialize_kitchen_sink_stuff = function () {
// scroll handler, but when we're at the top or bottom of the
// page, the pointer may still need to move.
- if (delta < 0) {
- if (message_viewport.at_top()) {
- navigate.up();
- }
+ if (delta < 0 && message_viewport.at_top()) {
+ navigate.up();
} else if (delta > 0 && message_viewport.at_bottom()) {
navigate.down();
}