diff --git a/lib/sympto-adapter.js b/lib/sympto-adapter.js index f2fb1c0..5caf8ea 100644 --- a/lib/sympto-adapter.js +++ b/lib/sympto-adapter.js @@ -113,6 +113,10 @@ function formatCycleForSympto(cycle) { if (hasIncompleteCervixValue(day)) { delete day.cervix } + // remove days with incomplete mucus value (because nfp-mucus returns null when that's the case) + if (day.mucus.value === null) { + delete day.mucus + } // change format ['bleeding', 'temperature', 'mucus'].forEach(symptomName => { if (day[symptomName]) day[symptomName] = day[symptomName].value