Ignore 0 -> 1 mucus shift
This commit is contained in:
+5
-1
@@ -1,4 +1,5 @@
|
||||
export default function (cycleDays, tempEvalEndIndex) {
|
||||
const notDetected = { detected: false}
|
||||
const mucusDays = cycleDays.filter(day => day.mucus && !day.mucus.exclude)
|
||||
let currentBestQuality = 0
|
||||
|
||||
@@ -9,6 +10,9 @@ export default function (cycleDays, tempEvalEndIndex) {
|
||||
currentBestQuality = day.mucus.value
|
||||
}
|
||||
|
||||
// if mucus only changes from dry to nothing, it doesn't constitute a shift
|
||||
if (currentBestQuality < 2) continue
|
||||
|
||||
if (day.mucus.value !== currentBestQuality) continue
|
||||
|
||||
// the three following days must be of lower quality
|
||||
@@ -40,6 +44,6 @@ export default function (cycleDays, tempEvalEndIndex) {
|
||||
}
|
||||
}
|
||||
|
||||
return { detected: false }
|
||||
return notDetected
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user