Skip to content

Commit

Permalink
Add key to v-for
Browse files Browse the repository at this point in the history
  • Loading branch information
jlpereira committed Dec 20, 2024
1 parent 32fd71e commit e0c4b62
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/Couplet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@
<p>{{ store.state.currentNode.text }}</p>
</div>
<div class="pinpoint-couplet-children-container">
<Node v-for="node in nodes" :node="node" />
<Node
v-for="node in nodes"
:node="node"
:key="node.id"
/>
</div>
</div>
</template>
Expand All @@ -31,7 +35,7 @@ const store = inject('store')
const nodes = computed(() => {
const ids = store.state.currentNode.children
return ids.map(id => store.state.nodes[id])
return ids.map((id) => store.state.nodes[id])
})
</script>

Expand Down

0 comments on commit e0c4b62

Please sign in to comment.