# HG changeset patch # User Lucas Thompson # Date 1481033899 0 # Node ID f31b14e2132e7195cdc6862a22f8181eb261fd09 # Parent 92c139e16b51c637cfe28efb897c13bb68b5f28e Guard against extracting when no extractor selected and remove some other redundant code. diff -r 92c139e16b51 -r f31b14e2132e src/app/app.component.html --- a/src/app/app.component.html Tue Dec 06 11:12:56 2016 +0000 +++ b/src/app/app.component.html Tue Dec 06 14:18:19 2016 +0000 @@ -28,5 +28,7 @@ - + diff -r 92c139e16b51 -r f31b14e2132e src/app/app.component.ts --- a/src/app/app.component.ts Tue Dec 06 11:12:56 2016 +0000 +++ b/src/app/app.component.ts Tue Dec 06 14:18:19 2016 +0000 @@ -36,7 +36,7 @@ } extractFeatures(outputInfo: ExtractorOutputInfo): void { - if (!this.canExtract) return; + if (!this.canExtract || !outputInfo) return; this.canExtract = false; this.piperService.process({ audioData: [...Array(this.audioBuffer.numberOfChannels).keys()] @@ -47,9 +47,8 @@ }, key: outputInfo.extractorKey, outputId: outputInfo.outputId - }).then(data => { + }).then(() => { this.canExtract = true; - console.log(data); }).catch(err => console.error(err)); } }