Skip to content
Snippets Groups Projects
Commit 537b8c76 authored by Julia Friesel's avatar Julia Friesel
Browse files

For 3 following values, look at mucus days, not cycle days

parent 2f8054c1
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@ export default function (cycleDays) {
const mucusPeak = mucusDays.find((day, i) => {
if (day.mucus.value !== bestQuality) return false
const threeFollowingDays = cycleDays.slice(i + 1, i + 4)
const threeFollowingDays = mucusDays.slice(i + 1, i + 4)
if (threeFollowingDays.length < 3) return false
return threeFollowingDays.every(day => day.mucus.value < bestQuality)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment