diff --git a/modules/adgenerationBidAdapter.js b/modules/adgenerationBidAdapter.js index 340017c26cf0..935dd65d36ab 100644 --- a/modules/adgenerationBidAdapter.js +++ b/modules/adgenerationBidAdapter.js @@ -75,11 +75,6 @@ export const spec = { return []; } const bidRequest = bidRequests.bidRequest; - if (!bidRequest.mediaTypes || bidRequest.mediaTypes.banner) { - if (!body.w || !body.h) { - return []; - } - } const bidResponse = { requestId: bidRequest.bidId, cpm: body.cpm || 0, @@ -91,7 +86,7 @@ export const spec = { netRevenue: true, ttl: body.ttl || 10, }; - if (bidRequest.mediaTypes && bidRequest.mediaTypes.native) { + if (isNative(body)) { bidResponse.native = createNativeAd(body); bidResponse.mediaType = NATIVE; } else { @@ -124,6 +119,11 @@ function createAd(body, bidRequest) { return ad; } +function isNative(body) { + if (!body) return false; + return body.native_ad; +} + function createNativeAd(body) { let native = {}; if (body.native_ad && body.native_ad.assets.length > 0) {