A local-first personal finance app
Goals: Cleanup script error (#1095)
shall0pass400078dce569
diff --git a/packages/loot-core/src/server/budget/cleanup-template.ts b/packages/loot-core/src/server/budget/cleanup-template.tsindex fcd0cc8204..95045d6c57 100644--- a/packages/loot-core/src/server/budget/cleanup-template.ts+++ b/packages/loot-core/src/server/budget/cleanup-template.ts@@ -37,7 +37,7 @@ async function processCleanup(month) {if (template.filter(t => t.type === 'sink').length > 0) {sinkCategory.push({ cat: category, temp: template });num_sinks += 1;- total_weight += template[0].weight;+ total_weight += template.filter(w => w.type === 'sink')[0].weight;}}}diff --git a/upcoming-release-notes/1095.md b/upcoming-release-notes/1095.mdnew file mode 100644index 0000000000..08791b1086--- /dev/null+++ b/upcoming-release-notes/1095.md@@ -0,0 +1,6 @@+---+category: Bugfix+authors: [shall0pass]+---++Fixes an error when 'sink' and 'source' are in the same category.\ No newline at end of file