From e363837f3bccae7fc2d78e4e43996e69595dfcaa Mon Sep 17 00:00:00 2001 From: Ramon Wijnands Date: Mon, 16 Jun 2014 11:09:33 +0200 Subject: [PATCH] check for songs --- client/views/playlists.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/views/playlists.js b/client/views/playlists.js index d29dcaf..68cd8f9 100644 --- a/client/views/playlists.js +++ b/client/views/playlists.js @@ -54,7 +54,7 @@ Template.playlistTabs.events = { youtubeSearch(input.val()); }, 'click button[data-toggle="clearResults"]': function(e) { - + $("input.youtube-query").val(""); searchResults = null; searchResultsDependency.changed(); @@ -217,6 +217,9 @@ Template.searchResults.error = function() { }; Template.songs.songs = function() { + if (!this.songs) + return; + // get all users that play a song on this playlist var users = Meteor.users.find({'profile.playing.playlist': this._id}); var indexes = _.groupBy(users.fetch(), function(u) {