mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-20 01:34:24 +08:00
fix the bug that the frontend would not display any secondary transaction categories after modifying the primary transaction category
This commit is contained in:
@@ -62,6 +62,10 @@ function updateCategoryInTransactionCategoryList(state, category, oldCategory) {
|
|||||||
if (categoryList) {
|
if (categoryList) {
|
||||||
for (let i = 0; i < categoryList.length; i++) {
|
for (let i = 0; i < categoryList.length; i++) {
|
||||||
if (categoryList[i].id === category.id) {
|
if (categoryList[i].id === category.id) {
|
||||||
|
if (!category.parentId || category.parentId === '0') {
|
||||||
|
category.subCategories = categoryList[i].subCategories;
|
||||||
|
}
|
||||||
|
|
||||||
categoryList.splice(i, 1, category);
|
categoryList.splice(i, 1, category);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user