Browse Source

Fixed issue where the preview button wouldn't work a lot of the times.

KrisVos130 9 years ago
parent
commit
6fae709236
1 changed files with 4 additions and 0 deletions
  1. 4 0
      app/client/client.js

+ 4 - 0
app/client/client.js

@@ -1410,6 +1410,8 @@ Template.stations.onCreated(function() {
     tag.src = "https://www.youtube.com/iframe_api";
     var firstScriptTag = document.getElementsByTagName('script')[0];
     firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
+    yt_player = undefined;
+    _sound = undefined;
 });
 
 Template.queues.onCreated(function() {
@@ -1417,6 +1419,8 @@ Template.queues.onCreated(function() {
     tag.src = "https://www.youtube.com/iframe_api";
     var firstScriptTag = document.getElementsByTagName('script')[0];
     firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
+    yt_player = undefined;
+    _sound = undefined;
 });
 
 Template.stations.onRendered(function() {