@folklore/ads
Advanced tools
Comparing version 0.0.90 to 0.0.91
@@ -525,5 +525,2 @@ 'use strict'; | ||
displaySlot(slot) { | ||
if (!slot.canBeDisplayed()) { | ||
return; | ||
} | ||
this.callDisplaySlot(slot); | ||
@@ -538,8 +535,11 @@ } | ||
googletag.cmd.push(() => { | ||
if (!slot.canBeDisplayed()) { | ||
return; | ||
} | ||
const id = slot.getElementId(); | ||
const path = slot.getAdPath(); | ||
debug$1('Displaying slot #%s(%s)...', id, path); | ||
googletag.display(slot.getAdSlot()); | ||
googletag.display(id); | ||
if (googletag.pubads().isInitialLoadDisabled()) { | ||
googletag.pubads().refresh([slot.getAdSlot()]); | ||
googletag.pubads().refresh([id]); | ||
} | ||
@@ -546,0 +546,0 @@ slot.setDisplayed(true); |
@@ -523,5 +523,2 @@ import PropTypes from 'prop-types'; | ||
displaySlot(slot) { | ||
if (!slot.canBeDisplayed()) { | ||
return; | ||
} | ||
this.callDisplaySlot(slot); | ||
@@ -536,8 +533,11 @@ } | ||
googletag.cmd.push(() => { | ||
if (!slot.canBeDisplayed()) { | ||
return; | ||
} | ||
const id = slot.getElementId(); | ||
const path = slot.getAdPath(); | ||
debug$1('Displaying slot #%s(%s)...', id, path); | ||
googletag.display(slot.getAdSlot()); | ||
googletag.display(id); | ||
if (googletag.pubads().isInitialLoadDisabled()) { | ||
googletag.pubads().refresh([slot.getAdSlot()]); | ||
googletag.pubads().refresh([id]); | ||
} | ||
@@ -544,0 +544,0 @@ slot.setDisplayed(true); |
{ | ||
"name": "@folklore/ads", | ||
"version": "0.0.90", | ||
"version": "0.0.91", | ||
"description": "Ads library", | ||
@@ -53,3 +53,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "65b5d27ef88f7fa8f39385476cb9764194417870", | ||
"gitHead": "43c75c431f508b5550824e00bc26bffe52a0cc7f", | ||
"dependencies": { | ||
@@ -56,0 +56,0 @@ "@folklore/hooks": "^0.0.71", |
81273