Skip to content
New issue

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

Fixed oneVideo TypeError when consentData is undefined #4788

Merged
merged 2 commits into from
Feb 11, 2020

Conversation

josephtyler
Copy link
Contributor

@josephtyler josephtyler commented Jan 28, 2020

Type of change

  • Bugfix
  • Feature
  • New bidder adapter
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Does this change affect user-facing APIs or examples documented on http://prebid.org?
  • Other

Description of change

Set a default value for consentData in getUserSyncs to avoid a TypeError.

Other information

Fixes #4787

@jsnellbaker
Copy link
Collaborator

Tagging @DeepthiNeeladri on this PR to get their input, as they seem to be the main maintainer for the adapter.

@DecayConstant
Copy link

In order to prevent TypeError: Cannot read property 'consentString' of undefined from occurring in the case that consentData is undefined but bidRequest.uspConsent is defined, another check (consentData && consentData.consentString) needs to be added here: https://github.com/prebid/Prebid.js/pull/4788/files#diff-31ef8e5337b272996bcfbcdb1a671351R240

@DeepthiNeeladri
Copy link
Contributor

Thanks for finding the issue. agree with @DecayConstant about adding consentData && consentData.consentString and changes look fine to me

@josephtyler
Copy link
Contributor Author

josephtyler commented Jan 29, 2020

consentData && consentData.consentString

Will update, thanks!

@josephtyler
Copy link
Contributor Author

@DecayConstant @DeepthiNeeladri The PR is updated with the consentData check on 240.

@DeepthiNeeladri
Copy link
Contributor

@idettman review pls

@DeepthiNeeladri
Copy link
Contributor

@jsnellbaker @DecayConstant @idettman review pls

Copy link
Collaborator

@jsnellbaker jsnellbaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jsnellbaker jsnellbaker merged commit c99c78f into prebid:master Feb 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

oneVideo adapter raises TypeError in 3.4.0
6 participants