Skip to content

Commit

Permalink
aol bid adapter: support IE (#5894)
Browse files Browse the repository at this point in the history
* support IE in aol spec

* array includes not supported IE11
  • Loading branch information
robertrmartinez authored Oct 28, 2020
1 parent 5bda2f1 commit 7da5dad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion modules/aolBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function resolveEndpointCode(bid) {

function getSupportedEids(bid) {
return bid.userIdAsEids.filter(eid => {
return SUPPORTED_USER_ID_SOURCES.includes(eid.source)
return SUPPORTED_USER_ID_SOURCES.indexOf(eid.source) !== -1
});
}

Expand Down
6 changes: 3 additions & 3 deletions test/spec/modules/aolBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -490,17 +490,17 @@ describe('AolAdapter', function () {
'&param1=val1&param2=val2&param3=val3&param4=val4');
});

for (const [source, idValue] of Object.entries(SUPPORTED_USER_ID_SOURCES)) {
Object.keys(SUPPORTED_USER_ID_SOURCES).forEach(source => {
it(`should set the user ID query param for ${source}`, function () {
let bidRequest = createCustomBidRequest({
params: getNexageGetBidParams()
});
bidRequest.bids[0].userId = {};
bidRequest.bids[0].userIdAsEids = createEidsArray(USER_ID_DATA);
let [request] = spec.buildRequests(bidRequest.bids);
expect(request.url).to.contain(`&eid${source}=${encodeURIComponent(idValue)}`);
expect(request.url).to.contain(`&eid${source}=${encodeURIComponent(SUPPORTED_USER_ID_SOURCES[source])}`);
});
}
});

it('should return request object for One Mobile POST endpoint when POST configuration is present', function () {
let bidConfig = getNexagePostBidParams();
Expand Down

0 comments on commit 7da5dad

Please sign in to comment.