Ver código fonte

fix(Manage Station): console errors because station object wasn't fetched yet

Signed-off-by: Jonathan <theflametrooper@gmail.com>
Jonathan 3 anos atrás
pai
commit
2447918a8b

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

@@ -18,7 +18,7 @@
 			>
 				<song-item
 					v-for="(song, index) in queue"
-					:key="index + song.youtubeId"
+					:key="`key-${index}`"
 					:song="song"
 					:requested-by="
 						station.type === 'community' &&

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

@@ -2,6 +2,7 @@
 	<div
 		class="universal-item song-item"
 		:class="{ 'with-duration': duration }"
+		v-if="song"
 	>
 		<div class="thumbnail-and-info">
 			<song-thumbnail :class="{ large: largeThumbnail }" :song="song" />

+ 1 - 0
frontend/src/components/modals/ManageStation/index.vue

@@ -1,5 +1,6 @@
 <template>
 	<modal
+		v-if="station"
 		:title="
 			!isOwnerOrAdmin() && station.partyMode
 				? 'Add Song to Queue'