Fix: Sets isCycleStart to false when bleeding value gets deleted

This commit is contained in:
bl00dymarie
2024-09-09 18:43:57 +02:00
parent c21fd193ce
commit 0f7e3fe0ad
2 changed files with 11 additions and 9 deletions
+1 -1
View File
@@ -90,7 +90,7 @@ export function saveSymptom(symptom, date, val) {
let cycleDay = getCycleDay(date)
if (!cycleDay) cycleDay = createCycleDay(date)
db.write(() => {
if (symptom === 'bleeding' && val != null && val.value != null) {
if (symptom === 'bleeding' && val && val.value != null) {
const mensesDaysAfter = getMensesDaysRightAfter(cycleDay)
maybeSetNewCycleStart({
val,