Mercurial > hg > ugly-duckling
changeset 249:55be5d2e96f6
Small tidy.
author | Lucas Thompson <dev@lucas.im> |
---|---|
date | Thu, 27 Apr 2017 10:34:18 +0100 |
parents | 4224929943bc |
children | c60b03098bae |
files | src/app/services/feature-extraction/FeatureExtractionWorker.ts |
diffstat | 1 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/app/services/feature-extraction/FeatureExtractionWorker.ts Thu Apr 27 10:32:09 2017 +0100 +++ b/src/app/services/feature-extraction/FeatureExtractionWorker.ts Thu Apr 27 10:34:18 2017 +0100 @@ -89,12 +89,11 @@ const percentage = 100 * (val.processedBlockCount / val.totalBlockCount) | 0; const pointDifference = (percentage - lastPercentagePoint); - if (pointDifference === 1 || percentage === 100) { + const shouldEmit = pointDifference === 1 || percentage === 100; + if (shouldEmit) { lastPercentagePoint = percentage; - return true; - } else { - return false; } + return shouldEmit; }); } }