Fix infinite loop in repeat goal (#1019)

I believe I found the infinite loop problem in the repeat goal.  

This doesn't mess things up if you are budgeting the same month that the
goal starts, that's probably why we didn't see it before.

Side note: The logic always starts at the start date in the template,
then increments until falling in the right month window. If this
template gets used for, say, a few years, it will start to bog down the
processing. If someone has a good quick fix I can add that.
This commit is contained in:
youngcw
2023-05-13 05:36:00 -07:00
committed by GitHub
parent 5afd76fb45
commit 54f9b712e4
2 changed files with 7 additions and 1 deletions

View File

@@ -398,8 +398,8 @@ async function applyCategoryTemplate(
if (budgetAvailable > 0) to_budget += budgetAvailable;
errors.push(`Insufficient funds.`);
}
w = addWeeks(w, weeks);
}
w = addWeeks(w, weeks);
}
break;
}

View File

@@ -0,0 +1,6 @@
---
category: Bugfix
authors: [youngcw]
---
Fix infinite loop condition in repeat goal