Skip to content

Commit dc3697d

Browse files
committed
fix(Ads): Fix usage of ENABLE-SKIP-AFTER and ENABLE-SKIP-FOR (#7677)
1 parent 069abbb commit dc3697d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/ads/interstitial_ad_manager.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -954,14 +954,14 @@ shaka.ads.InterstitialAdManager = class {
954954
const skipControl = dataAsJson['SKIP-CONTROL'];
955955
if (skipControl) {
956956
const enableSkipAfterValue = skipControl['ENABLE-SKIP-AFTER'];
957-
if (enableSkipAfterValue instanceof Number) {
957+
if ((typeof enableSkipAfterValue) == 'number') {
958958
skipOffset = parseFloat(enableSkipAfterValue);
959959
if (isNaN(enableSkipAfterValue)) {
960960
skipOffset = isSkippable ? 0 : null;
961961
}
962962
}
963963
const enableSkipForValue = skipControl['ENABLE-SKIP-FOR'];
964-
if (enableSkipForValue instanceof Number) {
964+
if ((typeof enableSkipForValue) == 'number') {
965965
skipFor = parseFloat(enableSkipForValue);
966966
if (isNaN(enableSkipForValue)) {
967967
skipFor = null;

0 commit comments

Comments
 (0)