Parcourir la source

fix: EditSong had a few issues when clicking Save and next button

Kristian Vos il y a 2 ans
Parent
commit
7cdddddb12
1 fichiers modifiés avec 2 ajouts et 10 suppressions
  1. 2 10
      frontend/src/components/modals/EditSong/index.vue

+ 2 - 10
frontend/src/components/modals/EditSong/index.vue

@@ -47,14 +47,6 @@ const props = defineProps({
 	discogsAlbum: { type: Object, default: null }
 });
 
-const emit = defineEmits([
-	"error",
-	"flagSong",
-	"nextSong",
-	"close",
-	"toggleFlag"
-]);
-
 const editSongStore = useEditSongStore(props);
 const stationStore = useStationStore();
 const { socket } = useWebsocketsStore();
@@ -866,7 +858,7 @@ const save = (songToCopy, closeOrNext, saveButtonRefName, _newSong = false) => {
 				return;
 			}
 
-			if (bulk.value) emit("nextSong");
+			if (bulk.value) editNextSong();
 			else modalsStore.closeCurrentModal();
 		});
 	return socket.dispatch(`songs.update`, _song._id, _song, res => {
@@ -885,7 +877,7 @@ const save = (songToCopy, closeOrNext, saveButtonRefName, _newSong = false) => {
 
 		if (!closeOrNext) return;
 
-		if (bulk.value) emit("nextSong");
+		if (bulk.value) editNextSong();
 		else modalsStore.closeCurrentModal();
 	});
 };