Skip to content

Commit

Permalink
refactor: use Array#includes instead of indexOf (#548)
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfy1339 authored May 28, 2021
1 parent 67ec3ff commit 9d85f76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/event-handler/on.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function receiverOn(
throw new Error(message);
}

if (emitterEventNames.indexOf(webhookNameOrNames) === -1) {
if (!emitterEventNames.includes(webhookNameOrNames)) {
state.log.warn(
`"${webhookNameOrNames}" is not a known webhook name (https://developer.github.com/v3/activity/events/types/)`
);
Expand Down

0 comments on commit 9d85f76

Please sign in to comment.