Skip to content

Commit 1c7604e

Browse files
authored
Merge pull request #21 from LOLDragoon/master
caught small bug with deleting html on components that aren't yet created
2 parents 592e390 + ba06241 commit 1c7604e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/HomeQueue.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<div :class="activeHTML === element[2] ? 'list-group-item-selected' : 'list-group-item'" @dblclick.self="setActiveElement(element)" v-for="(element) in renderList" :key="element[1] + Date.now()">
1717
<i class="fas fa fa-angle-double-down fa-md" @click="setLayer({text: element[0], id: element[2]})"></i>
1818
{{ element[0] }}
19-
<i class="fas fa fa-trash fa-md" @click.self="deleteElement(element[2])"></i>
19+
<i class="fas fa fa-trash fa-md" @click.self="deleteElement([element[1],element[2]])"></i>
2020
</div>
2121
</draggable>
2222
</section>
@@ -83,8 +83,8 @@ export default {
8383
methods: {
8484
...mapActions(['setActiveHTML', 'setActiveLayer', 'upOneLayer']),
8585
deleteElement (id) {
86-
if (this.activeComponent === '') this.$store.dispatch(deleteSelectedElement, id)
87-
else this.$store.dispatch(deleteFromComponentHtmlList, id)
86+
if (this.activeComponent === '') this.$store.dispatch(deleteSelectedElement, id[0])
87+
else this.$store.dispatch(deleteFromComponentHtmlList, id[1])
8888
},
8989
setActiveElement (element) {
9090
this.setActiveHTML(element)

0 commit comments

Comments
 (0)