Skip to content

Commit

Permalink
ixBidAdapter.js: allow siteId param to be number (#2729)
Browse files Browse the repository at this point in the history
* ixBidAdapter.js: allow siteId param to be number

In v0.x, the siteID param would be string or number. Somehow, this was restricted to just a string in v1.x.

* ixBidAdapter.js logical error (not enough coffee)

* ixBidAdapter_spec.js: allow number for backwards compat
  • Loading branch information
homeyjd authored and harpere committed Jun 20, 2018
1 parent 0dda32f commit ae287c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modules/ixBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export const spec = {
return false;
}

if (typeof bid.params.siteId !== 'string') {
if (typeof bid.params.siteId !== 'string' && typeof bid.params.siteId !== 'number') {
return false;
}

Expand Down
4 changes: 2 additions & 2 deletions test/spec/modules/ixBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ describe('IndexexchangeAdapter', () => {
expect(spec.isBidRequestValid(bid)).to.equal(true);
});

it('should return false when siteID is number', () => {
it('should return true when siteID is number', () => {
const bid = utils.deepClone(DEFAULT_BANNER_VALID_BID[0]);
bid.params.siteId = 123;
expect(spec.isBidRequestValid(bid)).to.equal(false);
expect(spec.isBidRequestValid(bid)).to.equal(true);
});

it('should return false when siteID is missing', () => {
Expand Down

0 comments on commit ae287c3

Please sign in to comment.