Skip to content

Commit

Permalink
[ML] Adding string type check to jobs list search (#22627)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgowdyelastic committed Sep 3, 2018
1 parent f95b008 commit d5ea684
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion x-pack/plugins/ml/public/jobs/jobs_list/components/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,10 @@ export function filterJobs(jobs, clauses) {
}

function stringMatch(str, substr) {
return ((str.toLowerCase().match(substr.toLowerCase()) === null) === false);
return (
(typeof str === 'string' && typeof substr === 'string') &&
((str.toLowerCase().match(substr.toLowerCase()) === null) === false)
);
}

function jobProperty(job, prop) {
Expand Down

0 comments on commit d5ea684

Please sign in to comment.