Skip to content

Commit 30d8451

Browse files
APAP
authored andcommitted
delete children when deleting routes partially done
1 parent ce32f0d commit 30d8451

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/store/mutations.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,16 @@ const mutations = {
349349
state.parentSelected = payload
350350
},
351351
[types.DELETE_ROUTE]: (state, payload) => {
352+
// const deleteChildren = (children) => {
353+
// console.log('children', children.children)
354+
// children.children.forEach((child) => {
355+
// if (!state.componentMap[child].children.length) delete state.componentMap[child];
356+
// else deleteChildren(child);
357+
// });
358+
// }
359+
360+
// deleteChildren(state.routes[payload])
361+
352362
// const stateCopy = state
353363
delete state.routes[payload]
354364
delete state.componentMap[payload]

0 commit comments

Comments
 (0)