From 93f412e9834d68c7ea320b2aadcb41cb455d9e9f Mon Sep 17 00:00:00 2001 From: bl00dymarie Date: Thu, 26 Sep 2024 18:17:55 +0200 Subject: [PATCH] Fix: Clean/clarify condition for bleedingDeleted --- lib/set-new-cycle-start.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/set-new-cycle-start.js b/lib/set-new-cycle-start.js index ab61cde..496985a 100644 --- a/lib/set-new-cycle-start.js +++ b/lib/set-new-cycle-start.js @@ -22,7 +22,7 @@ export default function ({ } function bleedingValueDeletedOrExluded(val) { - const bleedingDeleted = !val || (val && !(typeof val.value === 'number')) + const bleedingDeleted = !val || !(typeof val?.value === 'number') const bleedingExcluded = val && val.exclude return bleedingDeleted || bleedingExcluded }