From 21d4ce39f052ade1addb5865c99ad801fe560f5f Mon Sep 17 00:00:00 2001 From: protonate Date: Mon, 13 Feb 2017 12:21:25 -0800 Subject: [PATCH] check truthiness of adUnitCode --- src/bidmanager.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/bidmanager.js b/src/bidmanager.js index d3ee1ab7d79..bef2b0a0542 100644 --- a/src/bidmanager.js +++ b/src/bidmanager.js @@ -93,6 +93,11 @@ function getBidderRequest(bidder, adUnitCode) { * This function should be called to by the bidder adapter to register a bid response */ exports.addBidResponse = function (adUnitCode, bid) { + if (!adUnitCode) { + utils.logWarn('No adUnitCode supplied to addBidResponse, response discarded'); + return; + } + if (bid) { const { requestId, start } = getBidderRequest(bid.bidderCode, adUnitCode);