[Bug] End of month cleanup error (#1750)

* check for null carryover

* release note

* simplify logic
This commit is contained in:
shall0pass
2023-10-06 17:12:13 -05:00
committed by GitHub
parent d3ab8f9812
commit 316da144e1
2 changed files with 10 additions and 0 deletions

View File

@@ -57,6 +57,10 @@ async function processCleanup(month: string): Promise<Notification> {
[db_month, categoryId],
);
if (carryover === null) {
carryover = { carryover: 0 };
}
if (
balance < 0 &&
Math.abs(balance) <= budgetAvailable &&

View File

@@ -0,0 +1,6 @@
---
category: Bugfix
authors: [shall0pass]
---
End of month cleanup - fixed condition that caused an error with null carryover value