Skip to content

Commit

Permalink
mediasquare fix userId (#6321)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthieularere-msq authored Feb 18, 2021
1 parent 26a268a commit cfe4464
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/mediasquareBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ export const spec = {
}
if (bidderRequest.uspConsent) { payload.uspConsent = bidderRequest.uspConsent; }
if (bidderRequest.schain) { payload.schain = bidderRequest.schain; }
if (bidderRequest.userId) { payload.userId = bidderRequest.userId; }
if (bidderRequest.userId) {
payload.userId = bidderRequest.userId;
} else if (bidderRequest.hasOwnProperty('bids') && typeof bidderRequest.bids == 'object' && bidderRequest.bids.length > 0 && bidderRequest.bids[0].hasOwnProperty('userId')) {
payload.userId = bidderRequest.bids[0].userId;
}
};
if (test) { payload.debug = true; }
const payloadString = JSON.stringify(payload);
Expand Down

0 comments on commit cfe4464

Please sign in to comment.