diff --git a/src/userSync.js b/src/userSync.js index fceeb1d722d9..f653880fa29f 100644 --- a/src/userSync.js +++ b/src/userSync.js @@ -225,7 +225,7 @@ export function newUserSync(userSyncDependencies) { } return checkForFiltering[filterType](biddersToFilter, bidder); } - return false; + return !permittedPixels[type]; } /** diff --git a/test/spec/userSync_spec.js b/test/spec/userSync_spec.js index 2b68349ca31e..55b613ce9293 100644 --- a/test/spec/userSync_spec.js +++ b/test/spec/userSync_spec.js @@ -475,6 +475,24 @@ describe('user sync', function () { }); expect(userSync.canBidderRegisterSync('iframe', 'otherTestBidder')).to.equal(false); }); + it('should return false for iframe if there is no iframe filterSettings', function () { + const userSync = newUserSync({ + config: { + syncEnabled: true, + filterSettings: { + image: { + bidders: '*', + filter: 'include' + } + }, + syncsPerBidder: 5, + syncDelay: 3000, + auctionDelay: 0 + } + }); + + expect(userSync.canBidderRegisterSync('iframe', 'otherTestBidder')).to.equal(false); + }); it('should return true if filter settings does allow it', function () { const userSync = newUserSync({ config: {