eslint: Fix unicorn/prefer-array-find.

https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-array-find.md

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2020-10-07 02:24:24 -07:00
committed by Tim Abbott
parent 72cc78dfa3
commit 2694f5caed
3 changed files with 4 additions and 4 deletions

View File

@@ -50,9 +50,9 @@ exports.schedule_message = function (request) {
const command_line = raw_message[0];
const message = raw_message.slice(1).join("\n");
const deferred_message_type = deferred_message_types.filter(
const deferred_message_type = deferred_message_types.find(
(props) => command_line.match(props.test) !== null,
)[0];
);
const command = command_line.match(deferred_message_type.test)[0];
const deliver_at = command_line.slice(command.length + 1);