diff --git a/src/auction.js b/src/auction.js index 9052d6fd7a8..6dd0432712f 100644 --- a/src/auction.js +++ b/src/auction.js @@ -914,6 +914,7 @@ export function getStandardBidderSettings(mediaType, bidderCode) { } } } + return standardSettings; } @@ -965,7 +966,7 @@ function setKeys(keyValues, bidderSettings, custBidObj, bidReq) { if ( ((typeof bidderSettings.suppressEmptyKeys !== 'undefined' && bidderSettings.suppressEmptyKeys === true) || - key === CONSTANTS.TARGETING_KEYS.DEAL) && // hb_deal is suppressed automatically if not set + key === CONSTANTS.TARGETING_KEYS.DEAL || key === CONSTANTS.TARGETING_KEYS.ACAT) && // hb_deal & hb_acat are suppressed automatically if not set ( isEmptyStr(value) || value === null || diff --git a/test/spec/auctionmanager_spec.js b/test/spec/auctionmanager_spec.js index 5ddf3ebf75e..6a72da8edce 100644 --- a/test/spec/auctionmanager_spec.js +++ b/test/spec/auctionmanager_spec.js @@ -232,6 +232,15 @@ describe('auctionmanager.js', function () { assert.deepEqual(response, expected); }); + it('should suppress acat if undefined', function () { + const noAcatBid = deepClone(DEFAULT_BID); + noAcatBid.meta.primaryCatId = '' + let expected = getDefaultExpected(noAcatBid); + delete expected.hb_acat; + let response = getKeyValueTargetingPairs(noAcatBid.bidderCode, noAcatBid); + assert.deepEqual(response, expected); + }); + it('No bidder level configuration defined - default for video', function () { config.setConfig({ cache: {