Pārlūkot izejas kodu

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

KrisVos130 9 gadi atpakaļ
vecāks
revīzija
6fae709236
1 mainītis faili ar 4 papildinājumiem un 0 dzēšanām
  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";
     tag.src = "https://www.youtube.com/iframe_api";
     var firstScriptTag = document.getElementsByTagName('script')[0];
     var firstScriptTag = document.getElementsByTagName('script')[0];
     firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
     firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
+    yt_player = undefined;
+    _sound = undefined;
 });
 });
 
 
 Template.queues.onCreated(function() {
 Template.queues.onCreated(function() {
@@ -1417,6 +1419,8 @@ Template.queues.onCreated(function() {
     tag.src = "https://www.youtube.com/iframe_api";
     tag.src = "https://www.youtube.com/iframe_api";
     var firstScriptTag = document.getElementsByTagName('script')[0];
     var firstScriptTag = document.getElementsByTagName('script')[0];
     firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
     firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
+    yt_player = undefined;
+    _sound = undefined;
 });
 });
 
 
 Template.stations.onRendered(function() {
 Template.stations.onRendered(function() {