Skip to content

Commit

Permalink
update quantcastBidAdapter to make user sync flag non-constant
Browse files Browse the repository at this point in the history
  • Loading branch information
mckurt committed Nov 12, 2020
1 parent 2b0bd53 commit 8f0dd51
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions modules/quantcastBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ function checkTCFv2(tcData) {
return !!(vendorConsent && purposeConsent);
}

let hasUserSynced = false;

/**
* The documentation for Prebid.js Adapter 1.0 can be found at link below,
* http://prebid.org/dev-docs/bidder-adapter-1.html
Expand All @@ -109,7 +111,6 @@ export const spec = {
code: BIDDER_CODE,
GVLID: 11,
supportedMediaTypes: ['banner', 'video'],
hasUserSynced: false,

/**
* Verify the `AdUnits.bids` response with `true` for valid request and `false`
Expand Down Expand Up @@ -271,7 +272,7 @@ export const spec = {
},
getUserSyncs(syncOptions, serverResponses) {
const syncs = []
if (!this.hasUserSynced && syncOptions.pixelEnabled) {
if (!hasUserSynced && syncOptions.pixelEnabled) {
const responseWithUrl = find(serverResponses, serverResponse =>
utils.deepAccess(serverResponse.body, 'userSync.url')
);
Expand All @@ -283,12 +284,12 @@ export const spec = {
url: url
});
}
this.hasUserSynced = true;
hasUserSynced = true;
}
return syncs;
},
resetUserSync() {
this.hasUserSynced = false;
hasUserSynced = false;
}
};

Expand Down

0 comments on commit 8f0dd51

Please sign in to comment.