Skip to content

Commit 1c80f3b

Browse files
author
dogatech
committed
fix crash when using a recently edited song
1 parent abfc336 commit 1c80f3b

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

fe/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "SoulSifter",
33
"version": "1.5.0",
44
"description": "DJ & music organization app.",
5-
"build": 2992,
5+
"build": 2993,
66
"main": "main.js",
77
"scripts": {
88
"fe:build": "vite build",

fe/src/song-edit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ class SongEdit extends AlertsMixin(SettingsMixin(SongEditMixin(LitElement))) {
218218
}
219219

220220
if (this.editedSong.id) {
221-
this.notifySongEdited(this.editedSong);
221+
this.notifySongEdited(this.editedSong.id);
222222
this.editedSong.update();
223223
if (!this.songIsTrashed && this.editedSong.trashed) this.newSongManager.trashMusicFile(this.editedSong);
224224
} else {

fe/src/song-list.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,9 @@ class SongList extends AlertsMixin(BpmMixin(GenresMixin(PlaylistsMixin(QueryMixi
201201
}
202202
}
203203

204-
updateEditedSong(s) {
204+
updateEditedSong(id) {
205205
this.shadowRoot.querySelectorAll('song-list-item').forEach(el => {
206-
if (el.song.id == s.id) el.song = s;
206+
if (el.song.id == id) el.song = ss.Song.findById(id);
207207
});
208208
}
209209

fe/src/song-section.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,8 @@ class SongSection extends SettingsMixin(SongEditMixin(SongMixin(SongTrailMixin(L
208208
e.stopPropagation();
209209
}
210210

211-
updateEditedSong(s) {
212-
if (this.song.id == s.id) this.song = s;
211+
updateEditedSong(id) {
212+
if (this.song.id == id) this.song = ss.Song.findById(id);
213213
}
214214

215215
songEnded(e) {

0 commit comments

Comments
 (0)