浏览代码

fix(EditSong): turn duration int into double with three decimals for unsaved changed prompt

Kristian Vos 2 年之前
父节点
当前提交
3ac4d75302
共有 1 个文件被更改,包括 8 次插入2 次删除
  1. 8 2
      frontend/src/components/modals/EditSong/index.vue

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

@@ -1848,10 +1848,16 @@ export default {
 		},
 		onCloseModal() {
 			const songStringified = JSON.stringify({
-				...this.song
+				...this.song,
+				...{
+					duration: Number(this.song.duration).toFixed(3)
+				}
 			});
 			const originalSongStringified = JSON.stringify({
-				...this.originalSong
+				...this.originalSong,
+				...{
+					duration: Number(this.originalSong.duration).toFixed(3)
+				}
 			});
 			const unsavedChanges = songStringified !== originalSongStringified;