From da881eb55525f1529aef4a396e8b22242eb13b1b Mon Sep 17 00:00:00 2001 From: Jesse Date: Wed, 20 Jun 2018 16:56:12 -0700 Subject: [PATCH] ixBidAdapter.js: allow siteId param to be number (#2729) * 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 --- modules/ixBidAdapter.js | 2 +- test/spec/modules/ixBidAdapter_spec.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/ixBidAdapter.js b/modules/ixBidAdapter.js index f3ac8185f17e..89506a5659bf 100644 --- a/modules/ixBidAdapter.js +++ b/modules/ixBidAdapter.js @@ -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; } diff --git a/test/spec/modules/ixBidAdapter_spec.js b/test/spec/modules/ixBidAdapter_spec.js index 92a7190bcb69..36b2b0e9629a 100644 --- a/test/spec/modules/ixBidAdapter_spec.js +++ b/test/spec/modules/ixBidAdapter_spec.js @@ -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', () => {