Skip to content

Commit

Permalink
[ML] Adding string type check to jobs list search (#22627) (#22634)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgowdyelastic authored Sep 4, 2018
1 parent 8209490 commit e3911eb
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 e3911eb

Please sign in to comment.