Skip to content

Commit 4e4e400

Browse files
authored
Merge pull request #12 from allisons11/parentState
deleting parent component removes it from children parent object
2 parents d131394 + 425bb43 commit 4e4e400

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)