Skip to content

Commit

Permalink
refactor: Replace _.indexOf with arr.includes (#7825)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nguyễn Việt Đức committed Jun 8, 2020
1 parent 77fbb59 commit 332524d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class AwsCompileCloudWatchLogEvents {
throw new this.serverless.classes.Error(errorMessage);
}

if (_.indexOf(logGroupNames, LogGroupName) !== -1) {
if (logGroupNames.includes(LogGroupName)) {
const errorMessage = [
`"${LogGroupName}" logGroup for cloudwatchLog event is duplicated.`,
' This property can only be set once per CloudFormation stack.',
Expand Down

0 comments on commit 332524d

Please sign in to comment.