Browse Source

fix: fixed issues with closing EditSong modal

Kristian Vos 5 years ago
parent
commit
f3604e1cef
2 changed files with 8 additions and 7 deletions
  1. 6 6
      frontend/components/Admin/QueueSongs.vue
  2. 2 1
      frontend/components/Admin/Songs.vue

+ 6 - 6
frontend/components/Admin/QueueSongs.vue

@@ -131,12 +131,12 @@ export default {
 			modals: state => state.modals.admin
 		})
 	},
-	// watch: {
-	//   "modals.editSong": function(value) {
-	//     console.log(value);
-	//     if (value === false) this.stopVideo();
-	//   }
-	// },
+	watch: {
+		// eslint-disable-next-line func-names
+		"modals.editSong": function(value) {
+			if (value === false) this.stopVideo();
+		}
+	},
 	methods: {
 		edit(song, index) {
 			const newSong = {};

+ 2 - 1
frontend/components/Admin/Songs.vue

@@ -141,7 +141,8 @@ export default {
 		})
 	},
 	watch: {
-		"modals.editSong": val => {
+		// eslint-disable-next-line func-names
+		"modals.editSong": function(val) {
 			if (!val) this.stopVideo();
 		}
 	},