eslint: Fix unicorn/no-lonely-if.

https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v24.0.0/docs/rules/no-lonely-if.md

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2020-12-22 02:26:39 -08:00
committed by Tim Abbott
parent 6acbcec39d
commit 2f80415756
23 changed files with 223 additions and 247 deletions

View File

@@ -74,10 +74,8 @@ exports.initialize_kitchen_sink_stuff = function () {
if (message_viewport.at_top()) {
navigate.up();
}
} else if (delta > 0) {
if (message_viewport.at_bottom()) {
navigate.down();
}
} else if (delta > 0 && message_viewport.at_bottom()) {
navigate.down();
}
message_viewport.set_last_movement_direction(delta);