From 5bcde42b608f80202cd727825f7085009452b2dd Mon Sep 17 00:00:00 2001 From: Gleb Glushtsov Date: Tue, 18 Jun 2019 11:00:41 -0400 Subject: [PATCH] return id once element is found --- modules/33acrossBidAdapter.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/33acrossBidAdapter.js b/modules/33acrossBidAdapter.js index 5a308498981..9524b773660 100644 --- a/modules/33acrossBidAdapter.js +++ b/modules/33acrossBidAdapter.js @@ -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}`);