diff --git a/x-pack/plugins/ml/public/jobs/jobs_list/components/utils.js b/x-pack/plugins/ml/public/jobs/jobs_list/components/utils.js index f815c00d6bc0b5..e34683f2632613 100644 --- a/x-pack/plugins/ml/public/jobs/jobs_list/components/utils.js +++ b/x-pack/plugins/ml/public/jobs/jobs_list/components/utils.js @@ -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) {