cms/app-client/app/components/playlist-component.js
changeset 216 c174124d1849
parent 215 82878d132784
child 227 5c9250f55f4b
--- a/cms/app-client/app/components/playlist-component.js	Fri Jul 01 22:15:35 2016 +0200
+++ b/cms/app-client/app/components/playlist-component.js	Sun Jul 03 13:13:10 2016 +0200
@@ -38,8 +38,9 @@
         this.get('player').set('items', this.get('documents').map(function(document) {
             return document.get('id');
         }));
-
-        this.get('player').set('item', this.get('player').get('items')[0]);
+        if(this.get('player').get('items').length) {
+            this.get('player').set('item', this.get('player').get('items')[0]);    
+        }
     }).on('init'),
 
     init: function() {