diff --git a/modules/appnexusBidAdapter.js b/modules/appnexusBidAdapter.js index 1b8dbbf4d5b..0660f4f4b10 100644 --- a/modules/appnexusBidAdapter.js +++ b/modules/appnexusBidAdapter.js @@ -28,7 +28,6 @@ import {Renderer} from '../src/Renderer.js'; import {config} from '../src/config.js'; import {registerBidder} from '../src/adapters/bidderFactory.js'; import {ADPOD, BANNER, NATIVE, VIDEO} from '../src/mediaTypes.js'; -import {auctionManager} from '../src/auctionManager.js'; import {find, includes} from '../src/polyfill.js'; import {INSTREAM, OUTSTREAM} from '../src/video.js'; import {getStorageManager} from '../src/storageManager.js'; @@ -917,9 +916,7 @@ function bidToTag(bid) { tag['banner_frameworks'] = bid.params.frameworks; } - // TODO: why does this need to iterate through every ad unit? - let adUnit = find(auctionManager.getAdUnits(), au => bid.transactionId === au.transactionId); - if (adUnit && adUnit.mediaTypes && adUnit.mediaTypes.banner) { + if (deepAccess(bid, `mediaTypes.${BANNER}`)) { tag.ad_types.push(BANNER); }