From 6ed4139d94f7bed6a548d6a51ca6372d5a781888 Mon Sep 17 00:00:00 2001 From: Brice Shatzer Date: Tue, 12 Jun 2018 14:16:48 -0500 Subject: [PATCH] Fix for activeSizes issue --- src/manager.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/manager.js b/src/manager.js index f96ef9d..ba4c20e 100644 --- a/src/manager.js +++ b/src/manager.js @@ -520,6 +520,7 @@ AdManager.prototype.configureAd = function (element) { slot = this.googletag.defineSlot(adUnitPath, [], element.id); sizeMap = this.buildSizeMap(adUnitConfig.sizes); slot.defineSizeMapping(sizeMap); + slot.activeSizes = this.adUnitSizes(adUnitConfig.sizes); } if (!element.dataset) { @@ -536,7 +537,6 @@ AdManager.prototype.configureAd = function (element) { slot.addService(this.googletag.pubads()); - slot.activeSizes = this.adUnitSizes(adUnitConfig.sizes); if (adUnitConfig.eagerLoad) { slot.eagerLoad = true; @@ -633,7 +633,7 @@ AdManager.prototype.loadAds = function (element, updateCorrelator, useScopedSele * requested from A9. It is thus used as a fallback. * See Docs here https://developers.google.com/doubleclick-gpt/reference#googletagslot */ - activeSizes = this.adUnitSizes(adUnitConfig.sizes); + activeSizes = slot.activeSizes if (adUnitConfig.amazonEnabled && activeSizes && activeSizes.length) { this.fetchAmazonBids(thisEl.id, activeSizes, adUnitConfig.slotName); @@ -702,7 +702,7 @@ AdManager.prototype.refreshSlot = function (domElement) { }; /** - * Fetches IAS brand safety targeting data + * Fetches IAS brand safety targeting data * * @param None * @returns undefined