Skip to content

A local-first personal finance app

fix bug (#5594)

youngcw3dd22994b727
diff --git a/packages/loot-core/src/server/budget/category-template-context.ts b/packages/loot-core/src/server/budget/category-template-context.ts
index 6e6df8c07d..3050e91680 100644
--- a/packages/loot-core/src/server/budget/category-template-context.ts
+++ b/packages/loot-core/src/server/budget/category-template-context.ts
@@ -710,7 +710,7 @@ export class CategoryTemplateContext {
);
}
savedInfo.push({ numMonths, period });
- if (numMonths < shortNumMonths || !shortNumMonths) {
+ if (numMonths < shortNumMonths || shortNumMonths === undefined) {
shortNumMonths = numMonths;
}
}
diff --git a/upcoming-release-notes/5594.md b/upcoming-release-notes/5594.md
new file mode 100644
index 0000000000..fa5c9c39c1
--- /dev/null
+++ b/upcoming-release-notes/5594.md
@@ -0,0 +1,6 @@
+---
+category: Bugfix
+authors: [youngcw]
+---
+
+Fix by template not calculating properly under some stacked template conditions