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

add check to see if adObject is present #4058

Merged
merged 2 commits into from
Aug 6, 2019
Merged

Conversation

Fawke
Copy link
Contributor

@Fawke Fawke commented Aug 2, 2019

Type of change

  • Bugfix

Description of change

Aims to fix #2953.

If two instances of Prebid.js are loaded in the same scope, window.parent.postMessage is broadcasting an event, to which both the instances are listening. Hence, one of the instances is not able to find and adObject matching the adId in the secureCreative.js, receiveMessage method, which result in an error.

This PR adds a check to make sure adObject is defined before calling other functions depending on the adObject to function properly.

@jsnellbaker jsnellbaker added needs 2nd review Core module updates require two approvals from the core team needs review labels Aug 2, 2019
@robertrmartinez robertrmartinez merged commit a1ccdf0 into master Aug 6, 2019
sa1omon pushed a commit to gamoshi/Prebid.js that referenced this pull request Nov 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LGTM needs 2nd review Core module updates require two approvals from the core team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

secureCreative -> receiveMessage throws an error when no adObject is found
4 participants