mirror of
https://github.com/zulip/zulip.git
synced 2025-11-17 20:41:46 +00:00
eslint: Fix unicorn/no-reduce.
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-reduce.md Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
24d4ab327c
commit
e68595a3fc
@@ -594,12 +594,11 @@ exports.register_topic_handlers = function () {
|
||||
$("#topic_stream_edit_form_error").show();
|
||||
}
|
||||
|
||||
const params = $("#move_topic_form")
|
||||
.serializeArray()
|
||||
.reduce((obj, item) => {
|
||||
obj[item.name] = item.value;
|
||||
return obj;
|
||||
}, {});
|
||||
const params = Object.fromEntries(
|
||||
$("#move_topic_form")
|
||||
.serializeArray()
|
||||
.map(({name, value}) => [name, value]),
|
||||
);
|
||||
|
||||
const {old_topic_name, select_stream_id} = params;
|
||||
let {
|
||||
|
||||
Reference in New Issue
Block a user