# HG changeset patch # User Lucas Thompson # Date 1493284474 -3600 # Node ID 7a6ef711c73a48572b1fc96047c0f202e74eabd7 # Parent 56aa7f48693fc02ebd6e0fc9c97f0f2461e1be5d Only emit progress if totalBlockCount is present. diff -r 56aa7f48693f -r 7a6ef711c73a src/app/services/feature-extraction/feature-extraction.service.ts --- a/src/app/services/feature-extraction/feature-extraction.service.ts Wed Apr 26 18:43:05 2017 +0100 +++ b/src/app/services/feature-extraction/feature-extraction.service.ts Thu Apr 27 10:14:34 2017 +0100 @@ -68,10 +68,12 @@ extract(analysisItemId: string, request: SimpleRequest): Promise { return this.client.collect(request) .do(val => { - this.progressUpdated.next({ - id: analysisItemId, - value: (val.processedBlockCount / val.totalBlockCount) * 100 - }); + if (val.totalBlockCount > 0) { + this.progressUpdated.next({ + id: analysisItemId, + value: (val.processedBlockCount / val.totalBlockCount) * 100 + }); + } }) .toPromise() .then((response) => {