mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Fixed error with adding new song
This commit is contained in:
@@ -90,10 +90,16 @@ var List = {
|
||||
},
|
||||
|
||||
added_song: function(added){
|
||||
now_playing = full_playlist.pop();
|
||||
var now_playing;
|
||||
|
||||
if(full_playlist.length !== 0){
|
||||
now_playing = full_playlist.pop();
|
||||
}
|
||||
full_playlist.push(added);
|
||||
List.sortList();
|
||||
full_playlist.push(now_playing);
|
||||
if(now_playing){
|
||||
full_playlist.push(now_playing);
|
||||
}
|
||||
$("#suggested-"+added.id).remove();
|
||||
if(List.empty){
|
||||
List.empty = false;
|
||||
|
||||
Reference in New Issue
Block a user