Skip to content

A local-first personal finance app

Fix #template 0 causing an error (#751)

Jed Fox96c7af0c8dbc
diff --git a/packages/loot-core/src/server/budget/goaltemplates.js b/packages/loot-core/src/server/budget/goaltemplates.js
index b699a97d79..afd9173219 100644
--- a/packages/loot-core/src/server/budget/goaltemplates.js
+++ b/packages/loot-core/src/server/budget/goaltemplates.js
@@ -226,7 +226,7 @@ async function applyCategoryTemplate(category, template_lines, month, force) {
limit = amountToInteger(template.limit);
}
}
- if (template.monthly) {
+ if (template.monthly != null) {
let monthly = amountToInteger(template.monthly);
to_budget += monthly;
} else {
diff --git a/upcoming-release-notes/751.md b/upcoming-release-notes/751.md
new file mode 100644
index 0000000000..53ef42e55c
--- /dev/null
+++ b/upcoming-release-notes/751.md
@@ -0,0 +1,6 @@
+---
+category: Bugfix
+authors: [j-f1]
+---
+
+Fix `#template 0` causing an error