Handle cycle with mucus on first cycle day

This commit is contained in:
Julia Friesel
2018-07-24 14:21:10 +02:00
parent 5468c8051d
commit 5ce6bc8cfc
4 changed files with 53 additions and 3 deletions
+9 -3
View File
@@ -16,9 +16,15 @@ export default function getSymptoThermalStatus({ cycle, previousCycle, earlierCy
if (previousCycle) {
const statusForLast = getSymptoThermalStatus({ cycle: previousCycle })
if (statusForLast.temperatureShift) {
status.phases.preOvulatory = getPreOvulatoryPhase(cycle, [previousCycle, ...earlierCycles])
if (status.phases.preOvulatory.cycleDays.length === cycle.length) {
return status
const preOvuPhase = getPreOvulatoryPhase(
cycle,
[previousCycle, ...earlierCycles]
)
if (preOvuPhase) {
status.phases.preOvulatory = preOvuPhase
if (status.phases.preOvulatory.cycleDays.length === cycle.length) {
return status
}
}
}
}