Skip to content

Commit

Permalink
Fixed errors with SoundManager trying to assign titles to non existin…
Browse files Browse the repository at this point in the history
…g sounds in this.songs
  • Loading branch information
benjaminluck committed Jun 5, 2017
1 parent def3546 commit 5553437
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion js/components/SoundManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ var SoundManager = (function () {
self.soundcloudPlayer.getSounds(function(sounds){
console.log(sounds);
sounds.forEach(function(sound, index){
self.songs[index].displayName = sound.title;
if(sound.title){
if(self.songs[index]){
self.songs[index].displayName = sound.title;
}
}
});
});
self.soundcloudPlayer.bind(SC.Widget.Events.PAUSE, function(event){
Expand Down

0 comments on commit 5553437

Please sign in to comment.