Skip to content

Commit

Permalink
removing a bit of lodash
Browse files Browse the repository at this point in the history
  • Loading branch information
jgowdyelastic committed Jul 22, 2018
1 parent 7e9502c commit 7e7150b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions x-pack/plugins/ml/common/util/job_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,8 @@ export function basicJobValidation(job, fields, limits) {
return {
messages,
valid,
contains(id) { return _.some(messages, { id }); },
find(id) { return _.find(messages, { id }); }
contains: id => (messages.some(m => id === m.id)),
find: id => (messages.find(m => id === m.id)),
};
}

Expand All @@ -409,8 +409,8 @@ export function validateModelMemoryLimit(job, limits) {
return {
valid,
messages,
contains(id) { return _.some(messages, { id }); },
find(id) { return _.find(messages, { id }); }
contains: id => (messages.some(m => id === m.id)),
find: id => (messages.find(m => id === m.id)),
};
}

Expand All @@ -434,7 +434,7 @@ export function validateGroupNames(job) {
return {
valid,
messages,
contains(id) { return _.some(messages, { id }); },
find(id) { return _.find(messages, { id }); }
contains: id => (messages.some(m => id === m.id)),
find: id => (messages.find(m => id === m.id)),
};
}

0 comments on commit 7e7150b

Please sign in to comment.