Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adnuntius Bid Adapter : bugfix void au ids #10890

Merged
merged 7 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions modules/adnuntiusBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const storageTool = (function () {
}

const updateVoidAuIds = function (currentVoidAuIds, auIdsAsString) {
const newAuIds = auIdsAsString ? auIdsAsString.split(';') : [];
const newAuIds = isStr(auIdsAsString) ? auIdsAsString.split(';') : [];
const notNewExistingAuIds = currentVoidAuIds.filter(auIdObj => {
return newAuIds.indexOf(auIdObj.value) < -1;
}) || [];
Expand All @@ -83,7 +83,7 @@ const storageTool = (function () {
}
}
}
const currentAuIds = updateVoidAuIds(metaAsObj.voidAuIds || [], apiResponse.voidAuIds || []);
const currentAuIds = updateVoidAuIds(metaAsObj.voidAuIds || [], apiResponse.voidAuIds);
if (currentAuIds.length > 0) {
metaAsObj.voidAuIds = { value: currentAuIds };
}
Expand Down
1 change: 1 addition & 0 deletions test/spec/modules/adnuntiusBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,7 @@ describe('adnuntiusBidAdapter', function() {
]
};
serverResponse.body.adUnits[0].deals = [];
delete serverResponse.body.metaData.voidAuIds; // test response with no voidAuIds

const interpretedResponse = spec.interpretResponse(serverResponse, altBidder);
expect(interpretedResponse).to.have.lengthOf(0);
Expand Down