mirror of
https://github.com/zulip/zulip.git
synced 2025-11-08 16:01:58 +00:00
eslint: Fix unicorn/no-array-callback-reference.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
552f4e3d22
commit
6cd694b8e3
@@ -35,14 +35,17 @@ exports.get_filtered_items = (value, list, opts) => {
|
||||
|
||||
if (!opts.filter) {
|
||||
if (get_item) {
|
||||
return list.map(get_item);
|
||||
return list.map((key) => get_item(key));
|
||||
}
|
||||
return [...list];
|
||||
}
|
||||
|
||||
if (opts.filter.filterer) {
|
||||
if (get_item) {
|
||||
return opts.filter.filterer(list.map(get_item), value);
|
||||
return opts.filter.filterer(
|
||||
list.map((key) => get_item(key)),
|
||||
value,
|
||||
);
|
||||
}
|
||||
return opts.filter.filterer(list, value);
|
||||
}
|
||||
@@ -62,7 +65,7 @@ exports.get_filtered_items = (value, list, opts) => {
|
||||
return result;
|
||||
}
|
||||
|
||||
return list.filter(predicate);
|
||||
return list.filter((item) => predicate(item));
|
||||
};
|
||||
|
||||
exports.alphabetic_sort = (prop) =>
|
||||
|
||||
Reference in New Issue
Block a user