From 07033c94b26370eba67b4574c35f50a94143a69b Mon Sep 17 00:00:00 2001 From: bohung Date: Thu, 19 May 2022 11:35:14 +0800 Subject: [PATCH] Fix bug. --- modules/ad_banner/_ad_banner_widget2_video.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ad_banner/_ad_banner_widget2_video.html.erb b/modules/ad_banner/_ad_banner_widget2_video.html.erb index 35f4c20..471623f 100644 --- a/modules/ad_banner/_ad_banner_widget2_video.html.erb +++ b/modules/ad_banner/_ad_banner_widget2_video.html.erb @@ -104,7 +104,7 @@ if (typeof onYouTubeIframeAPIReady !== 'function'){ window.yt_players = {}; function find_out_yt_event_list_key(yt_player){ var defalt_key = 'o'; - var all_keys = Object.keys(ytp).filter(function(s){return s.length == 1}); + var all_keys = Object.keys(yt_player).filter(function(s){return s.length == 1}); var prop_nums_thresh = 6; if(all_keys.indexOf(defalt_key) != -1){ if((yt_player[defalt_key] instanceof Object) && Object.keys(yt_player[defalt_key]).length > prop_nums_thresh){ @@ -122,7 +122,7 @@ if (typeof onYouTubeIframeAPIReady !== 'function'){ } function find_out_yt_event_list_count_key(yt_player, event_list_key){ var defalt_key = 'v'; - var all_keys = Object.keys(ytp).filter(function(s){return s.length == 1}); + var all_keys = Object.keys(yt_player).filter(function(s){return s.length == 1}); var equal_count = yt_player[event_list_key].length; if(all_keys.indexOf(defalt_key) != -1){ if(yt_player[defalt_key] == equal_count){