Skip to content

Commit

Permalink
fix a crash in editing
Browse files Browse the repository at this point in the history
  • Loading branch information
martindale committed Feb 25, 2015
1 parent 4d4c5c9 commit d1a678a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/soundtrack.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Soundtrack.prototype.broadcast = function(msg) {
for (var roomName in app.rooms) {
var room = app.rooms[ roomName ];
for (var i = 0; i < room.playlist.length; i++) {
if (!room.playlist[ i ]._id || !msg.track._id) return console.error('no id somewhere...');
if ( room.playlist[ i ]._id.toString() == msg.track._id.toString() ) {
room.playlist[ i ].title = msg.track.title;
room.playlist[ i ].slug = msg.track.slug;
Expand Down

0 comments on commit d1a678a

Please sign in to comment.