We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accessing property of possible undefined gdprConsent in request.
Trying to access gdprConsent.gdprApplies and gdprConsent.consentString but not checking if gdprConsent is undefined: https://github.com/prebid/Prebid.js/blob/master/modules/nextMillenniumBidAdapter.js#L41-L55
Solution would look something like this:
if (gdprConsent || uspConsent) { postBody.regs = { ext: {} } } if (uspConsent) { postBody.regs.ext.us_privacy = uspConsent; } if (typeof gdprConsent !== 'undefined') { if (typeof gdprConsent.gdprApplies !== 'undefined') { postBody.regs.ext.gdpr = gdprConsent.gdprApplies ? 1 : 0; } if (typeof gdprConsent.consentString !== 'undefined') { postBody.user = { ext: { consent: gdprConsent.consentString } } } }
@mifanich
The text was updated successfully, but these errors were encountered:
@hnkhandev @mifanich is there expected to be a pr in the future with these changes?
Sorry, something went wrong.
@ChrisHuie @hnkhandev #7817
ChrisHuie
Successfully merging a pull request may close this issue.
Type of issue
Accessing property of possible undefined gdprConsent in request.
Description
Trying to access gdprConsent.gdprApplies and gdprConsent.consentString but not checking if gdprConsent is undefined: https://github.com/prebid/Prebid.js/blob/master/modules/nextMillenniumBidAdapter.js#L41-L55
Solution would look something like this:
Other information
@mifanich
The text was updated successfully, but these errors were encountered: