Skip to content

Open source personal finance application

fix (getChildCategoriesIds): fix childIds

ilkome5d3fdce26714
diff --git a/store/categories/getters.js b/store/categories/getters.js
index f2d25055..f51f91d8 100644
--- a/store/categories/getters.js
+++ b/store/categories/getters.js
@@ -54,7 +54,7 @@ export default {
getChildCategoriesIds: (state, getters) => (categoryId) => {
if (!getters.hasCategories) return []
const category = state.items[categoryId]
- return category.childIds || []
+ return category?.childIds || []
},
lastUsedCategoriesIdsByDate (state, getters, rootState, rootGetters) {