File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -45,10 +45,11 @@ export default {
45
45
renderList: {
46
46
get () {
47
47
if (this .activeComponent === ' ' ) return this .selectedElementList
48
- let newArr = this .componentMap [this .activeComponent ].htmlList .map ((el , index ) => [el .text , index]).filter (el => {
48
+ // change activeComponent's htmlList into an array of arrays ([element/component name, index in state])
49
+ let sortedHTML = this .componentMap [this .activeComponent ].htmlList .map ((el , index ) => [el .text , index]).filter (el => {
49
50
return el[0 ] !== undefined
50
51
})
51
- return newArr
52
+ return sortedHTML
52
53
},
53
54
set (value) {
54
55
this .$store .dispatch (setSelectedElementList, value)
Original file line number Diff line number Diff line change @@ -185,6 +185,7 @@ const mutations = {
185
185
children . forEach ( ( child , index ) => {
186
186
if ( activeComponent === child ) {
187
187
children . splice ( index , 1 )
188
+ // removes component from activeComponent's htmlList
188
189
newObj [ compKey ] . htmlList = newObj [ compKey ] . htmlList . filter ( el => el !== activeComponent )
189
190
}
190
191
} )
You can’t perform that action at this time.
0 commit comments