mirror of
https://github.com/actualbudget/actual.git
synced 2026-04-29 18:19:44 -05:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
6
upcoming-release-notes/1019.md
Normal file
6
upcoming-release-notes/1019.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
category: Bugfix
|
||||
authors: [youngcw]
|
||||
---
|
||||
|
||||
Fix infinite loop condition in repeat goal
|
||||
Reference in New Issue
Block a user