Browse Source

fix: potentially some other issues with v-key not existing or not being explicit enough

Kristian Vos 1 year ago
parent
commit
23829a83f5

+ 1 - 1
frontend/src/components/RunJobDropdown.vue

@@ -75,7 +75,7 @@ const runJob = job => {
 			<div class="nav-dropdown-items" v-if="jobs.length > 0">
 				<quick-confirm
 					v-for="(job, index) in jobs"
-					:key="`job-${index}`"
+					:key="`job-${index}-${job.name}-${job.id}`"
 					placement="top"
 					@confirm="runJob(job)"
 				>

+ 1 - 1
frontend/src/components/SongItem.vue

@@ -172,7 +172,7 @@ onUnmounted(() => {
 					<strong>
 						<user-link
 							v-if="song.requestedBy"
-							:key="song._id"
+							:key="song.youtubeId"
 							:user-id="song.requestedBy"
 						/>
 						<span v-else>station</span>

+ 2 - 2
frontend/src/pages/Station/index.vue

@@ -2286,7 +2286,7 @@ onBeforeUnmount(() => {
 								:class="{ 'no-currently-playing': noSong }"
 							>
 								<song-item
-									:key="`songItem-currentSong-${currentSong._id}`"
+									:key="`songItem-currentSong-${currentSong.youtubeId}`"
 									:song="currentSong"
 									:duration="false"
 									:requested-by="true"
@@ -2299,7 +2299,7 @@ onBeforeUnmount(() => {
 								class="quadrant"
 							>
 								<song-item
-									:key="`songItem-nextSong-${nextSong._id}`"
+									:key="`songItem-nextSong-${nextSong.youtubeId}`"
 									:song="nextSong"
 									:duration="false"
 									:requested-by="true"