Skip to content

Commit

Permalink
Add key of v-for teams (#239)
Browse files Browse the repository at this point in the history
Other IDE showing error when using v-for without :key
  • Loading branch information
tanyudii authored Sep 20, 2020
1 parent 1f6baa6 commit b2f2e4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stubs/inertia/resources/js/Layouts/AppLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
</div>

<template v-for="team in $page.user.all_teams">
<form @submit.prevent="switchToTeam(team)">
<form @submit.prevent="switchToTeam(team)" :key="team.id">
<jet-responsive-nav-link as="button">
<div class="flex items-center">
<svg v-if="team.id == $page.user.current_team_id" class="mr-2 h-5 w-5 text-green-400" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" stroke="currentColor" viewBox="0 0 24 24"><path d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
Expand Down

0 comments on commit b2f2e4d

Please sign in to comment.