Skip to content

Commit 681c2bf

Browse files
committed
Merge branch 'nesting' of https://github.com/keliphan/OverVue into keriannmerge
2 parents 1af034e + f88b5b3 commit 681c2bf

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/components/HomeQueue.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,11 @@ export default {
4545
renderList: {
4646
get () {
4747
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 => {
4950
return el[0] !== undefined
5051
})
51-
return newArr
52+
return sortedHTML
5253
},
5354
set (value) {
5455
this.$store.dispatch(setSelectedElementList, value)

src/store/mutations.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ const mutations = {
185185
children.forEach((child, index) => {
186186
if (activeComponent === child) {
187187
children.splice(index, 1)
188+
// removes component from activeComponent's htmlList
188189
newObj[compKey].htmlList = newObj[compKey].htmlList.filter(el => el !== activeComponent)
189190
}
190191
})

0 commit comments

Comments
 (0)