Filter incomplete mucus values in sympto adapter
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user