refactor: simplify isPresent(x) ? x : y to x || y (#12166)

Closes #12166
This commit is contained in:
Victor Berchet
2016-10-07 18:11:37 -07:00
committed by Tobias Bosch
parent bdcf46f82e
commit d972d82354
18 changed files with 40 additions and 43 deletions

View File

@ -212,7 +212,7 @@ function createCountingValidator(
return new MockValidator(log, (completeSample: MeasureValues[]) => {
count--;
if (count === 0) {
return isPresent(validSample) ? validSample : completeSample;
return validSample || completeSample;
} else {
return null;
}