From dc3697db3c482b417171f8d8228544f73679341f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Velad=20Galv=C3=A1n?= Date: Wed, 27 Nov 2024 11:47:43 +0100 Subject: [PATCH] fix(Ads): Fix usage of ENABLE-SKIP-AFTER and ENABLE-SKIP-FOR (#7677) --- lib/ads/interstitial_ad_manager.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ads/interstitial_ad_manager.js b/lib/ads/interstitial_ad_manager.js index 5c20b1419b..554b961176 100644 --- a/lib/ads/interstitial_ad_manager.js +++ b/lib/ads/interstitial_ad_manager.js @@ -954,14 +954,14 @@ shaka.ads.InterstitialAdManager = class { const skipControl = dataAsJson['SKIP-CONTROL']; if (skipControl) { const enableSkipAfterValue = skipControl['ENABLE-SKIP-AFTER']; - if (enableSkipAfterValue instanceof Number) { + if ((typeof enableSkipAfterValue) == 'number') { skipOffset = parseFloat(enableSkipAfterValue); if (isNaN(enableSkipAfterValue)) { skipOffset = isSkippable ? 0 : null; } } const enableSkipForValue = skipControl['ENABLE-SKIP-FOR']; - if (enableSkipForValue instanceof Number) { + if ((typeof enableSkipForValue) == 'number') { skipFor = parseFloat(enableSkipForValue); if (isNaN(enableSkipForValue)) { skipFor = null;