# HG changeset patch # User Lucas Thompson # Date 1493285658 -3600 # Node ID 55be5d2e96f6fdf8def33e066e5b37537dfc5edc # Parent 4224929943bc2666710888858b7b3f4c49b88c9f Small tidy. diff -r 4224929943bc -r 55be5d2e96f6 src/app/services/feature-extraction/FeatureExtractionWorker.ts --- 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; }); } }