Displaying the highest maxTargets limit
This commit is contained in:
1 parent
ac2df0b3d0
commit
8ddec37c94
3 files changed
+5
-4
No files matched your search
@@ -25,10 +25,13 @@ export class CriteriaEvaluator {
|
||||
}
|
||||
|
||||
getMaxTargets() {
|
||||
let result;
|
||||
let result = 0;
|
||||
_.each(this.criteria, criterion => {
|
||||
if (criterion instanceof Criteria.MaxTargetsCriterion) {
|
||||
result = criterion.options.limit;
|
||||
const { limit } = criterion.options;
|
||||
if (limit > result) {
|
||||
result = limit;
|
||||
}
|
||||
}
|
||||
});
|
||||
return result;
|
||||
|
||||
Reference in new issue
Block a user