De-duplicate line
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
export default function ({
|
||||
val, cycleDay, mensesDaysAfter, checkIsMensesStart
|
||||
}) {
|
||||
// if a bleeding value is deleted or excluded, we need to check if
|
||||
// there are any following bleeding days and if the
|
||||
// next one of them is now a cycle start
|
||||
|
||||
cycleDay.bleeding = val
|
||||
|
||||
// if a bleeding value is deleted or excluded, we need to check if there are
|
||||
// any following bleeding days and if the next one of them is now a cycle
|
||||
// start
|
||||
if (bleedingValueDeletedOrExluded(val)) {
|
||||
cycleDay.bleeding = val
|
||||
cycleDay.isCycleStart = false
|
||||
if (!mensesDaysAfter.length) return
|
||||
const nextOne = mensesDaysAfter[mensesDaysAfter.length - 1]
|
||||
@@ -13,7 +15,6 @@ export default function ({
|
||||
nextOne.isCycleStart = true
|
||||
}
|
||||
} else {
|
||||
cycleDay.bleeding = val
|
||||
cycleDay.isCycleStart = checkIsMensesStart(cycleDay)
|
||||
maybeClearOldCycleStarts(cycleDay)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user