Skip to content

Commit

Permalink
Fix ancestorOrigin access (prebid#7429)
Browse files Browse the repository at this point in the history
Co-authored-by: francesco <f.orazini@onetag.com>
  • Loading branch information
2 people authored and Chris Pabst committed Jan 10, 2022
1 parent 1a45507 commit 1465f55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/onetagBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ function getPageInfo() {
? topmostFrame.document.referrer
: null,
ancestorOrigin:
window.location.ancestorOrigins && window.location.ancestorOrigins[0] != null
? window.location.ancestorOrigins[0]
window.location.ancestorOrigins && window.location.ancestorOrigins.length > 0
? window.location.ancestorOrigins[window.location.ancestorOrigins.length - 1]
: null,
masked: currentFrameNesting,
wWidth: topmostFrame.innerWidth,
Expand Down

0 comments on commit 1465f55

Please sign in to comment.