Skip to content

Commit

Permalink
Improved coded readability
Browse files Browse the repository at this point in the history
  • Loading branch information
ogupte committed Jun 16, 2020
1 parent 0de21b4 commit 3b8d771
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,14 @@ export async function getServiceAnomalies(
return [];
}

let apmMlJobs: AnomalyDetectionJob[];
let apmMlJobs: AnomalyDetectionJob[] = [];
try {
const { jobs } = await ml.anomalyDetectors.jobs(APM_ML_JOB_GROUP_NAME);
apmMlJobs = jobs;
} catch (error) {
// did not find any apm jobs
}
if (apmMlJobs.length === 0) {
return [];
}
const apmMlJobCategories = apmMlJobs
Expand Down

0 comments on commit 3b8d771

Please sign in to comment.