Skip to content

Commit

Permalink
return id once element is found
Browse files Browse the repository at this point in the history
  • Loading branch information
Gleb Glushtsov committed Jun 18, 2019
1 parent c2cb54d commit 5bcde42
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions modules/33acrossBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,10 @@ function _mapAdUnitPathToElementId(adUnitCode) {
if (utils.isGptPubadsDefined()) {
const adSlots = googletag.pubads().getSlots();
const isMatchingAdSlot = utils.isSlotMatchingAdUnitCode(adUnitCode);
let id;

for (let i = 0; i < adSlots.length; i++) {
if (isMatchingAdSlot(adSlots[i])) {
id = adSlots[i].getSlotElementId();
let id = adSlots[i].getSlotElementId();

utils.logInfo(`[33Across Adapter] Map ad unit path to HTML element id: '${adUnitCode}' -> ${id}`);

Expand Down

0 comments on commit 5bcde42

Please sign in to comment.