mirror of
https://github.com/zulip/zulip.git
synced 2025-11-14 10:57:58 +00:00
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:
committed by
Tim Abbott
parent
6acbcec39d
commit
2f80415756
@@ -69,10 +69,8 @@ exports.get_messages_in_topic = function (stream_id, topic) {
|
||||
exports.get_max_message_id_in_stream = function (stream_id) {
|
||||
let max_message_id = 0;
|
||||
for (const msg of message_list.all.all_messages()) {
|
||||
if (msg.type === "stream" && msg.stream_id === stream_id) {
|
||||
if (msg.id > max_message_id) {
|
||||
max_message_id = msg.id;
|
||||
}
|
||||
if (msg.type === "stream" && msg.stream_id === stream_id && msg.id > max_message_id) {
|
||||
max_message_id = msg.id;
|
||||
}
|
||||
}
|
||||
return max_message_id;
|
||||
|
||||
Reference in New Issue
Block a user