From 41b1c607fff9f9745e6085bbb9b81633d996a8ba Mon Sep 17 00:00:00 2001 From: Michael Winsauer Date: Sun, 20 Jan 2019 00:52:54 +0100 Subject: [PATCH] Fix getNonEmptyTerms --- service-website/src/components/SentimentAnalysis.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service-website/src/components/SentimentAnalysis.js b/service-website/src/components/SentimentAnalysis.js index 11b789c..5d3235a 100644 --- a/service-website/src/components/SentimentAnalysis.js +++ b/service-website/src/components/SentimentAnalysis.js @@ -72,12 +72,12 @@ class SentimentAnalysis extends Component { getNonEmptyTerms() { const terms = this.state.terms; - return terms.map(term => term.trim() !== ''); + return terms.filter((value, key) => value.trim() !== ''); } createPdf() { const terms = this.getNonEmptyTerms(); - if (terms.length > 0) { + if (terms.size > 0) { this.camundaService.submitPdfForm(terms); } } -- 2.43.0