Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzad31 committed Apr 24, 2020
1 parent db9c05a commit c473763
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x-pack/legacy/plugins/uptime/public/state/api/ml_anomaly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ const getJobPrefix = (monitorId: string) => {
// Subtracting ML_JOB_ID constant as well
const postfix = '_' + ML_JOB_ID;

if ((prefix + postfix).length >= 64) {
return prefix.substring(0, 64 - postfix.length - 1) + '_';
if ((prefix + postfix).length > 64) {
return prefix.substring(0, 64 - postfix.length) + '_';
}
return prefix + '_';
};
Expand Down

0 comments on commit c473763

Please sign in to comment.