Do not try to set categories, if none are available
This commit is contained in:
parent
e5cf439231
commit
1d81aa2fb3
@ -102,6 +102,8 @@ export const useAccountStore = defineStore("budget/account", {
|
||||
async FetchMonthBudget(budgetid: string, year: number, month: number) {
|
||||
const result = await GET("/budget/" + budgetid + "/" + year + "/" + month);
|
||||
const response = await result.json();
|
||||
if(response.Categories == undefined || response.Categories.length <= 0)
|
||||
return;
|
||||
this.addCategoriesForMonth(year, month, response.Categories);
|
||||
},
|
||||
addCategoriesForMonth(year: number, month: number, categories: Category[]): void {
|
||||
|
Loading…
x
Reference in New Issue
Block a user