From 20d1af4cdd571b946c5375f7b831cf79a7ed3a5f Mon Sep 17 00:00:00 2001 From: emelko Date: Mon, 30 Jul 2018 16:39:10 +0200 Subject: [PATCH 1/2] Fix mucus.value instead of mucus.computedNfp; additional check for mucus.value --- components/cycle-day/cycle-day-overview.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/cycle-day/cycle-day-overview.js b/components/cycle-day/cycle-day-overview.js index f021a82..fc28354 100644 --- a/components/cycle-day/cycle-day-overview.js +++ b/components/cycle-day/cycle-day-overview.js @@ -117,8 +117,8 @@ function getLabel(symptomName, symptom) { } }, mucus: mucus => { - if (typeof mucus.feeling === 'number' && typeof mucus.texture === 'number') { - let mucusLabel = `${feelingLabels[mucus.feeling]} + ${textureLabels[mucus.texture]} ( ${computeSensiplanMucusLabels[mucus.computedNfp]} )` + if (typeof mucus.feeling === 'number' && typeof mucus.texture === 'number' && typeof mucus.value === 'number') { + let mucusLabel = `${feelingLabels[mucus.feeling]} + ${textureLabels[mucus.texture]} ( ${computeSensiplanMucusLabels[mucus.value]} )` if (mucus.exclude) mucusLabel = "( " + mucusLabel + " )" return mucusLabel } From 5f840aa6691e341abcdccb39c656829c84c66074 Mon Sep 17 00:00:00 2001 From: emelko Date: Mon, 30 Jul 2018 18:29:35 +0200 Subject: [PATCH 2/2] For the sake of not exceeding max line length --- components/cycle-day/cycle-day-overview.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/cycle-day/cycle-day-overview.js b/components/cycle-day/cycle-day-overview.js index fc28354..f9edf06 100644 --- a/components/cycle-day/cycle-day-overview.js +++ b/components/cycle-day/cycle-day-overview.js @@ -117,7 +117,11 @@ function getLabel(symptomName, symptom) { } }, mucus: mucus => { - if (typeof mucus.feeling === 'number' && typeof mucus.texture === 'number' && typeof mucus.value === 'number') { + if ( + typeof mucus.feeling === 'number' && + typeof mucus.texture === 'number' && + typeof mucus.value === 'number' + ) { let mucusLabel = `${feelingLabels[mucus.feeling]} + ${textureLabels[mucus.texture]} ( ${computeSensiplanMucusLabels[mucus.value]} )` if (mucus.exclude) mucusLabel = "( " + mucusLabel + " )" return mucusLabel