Skip to content

Commit 425bb43

Browse files
APAP
authored andcommitted
deleting parent component removes it from children parent object
1 parent d131394 commit 425bb43

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/store/mutations.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ const mutations = {
8181
console.log(newObj[activeComponent])
8282
console.log("he saves the children but not the british children", activeObjChildrenArray)
8383

84+
activeObjChildrenArray.forEach((child => {
85+
delete newObj[child].parent[activeComponent]
86+
}))
87+
8488
delete newObj[activeComponent]
8589

8690
// goes in to make sure no children are the selected component any longer

0 commit comments

Comments
 (0)