Prebid.js icon indicating copy to clipboard operation
Prebid.js copied to clipboard

PBjs Core: bugfix - accessing array instead of adUnit

Open karimMourra opened this issue 1 year ago • 1 comments

Type of change

  • [x] Bugfix

  • [ ] Does this change affect user-facing APIs or examples documented on http://prebid.org?

  • [ ] Other

Description of change

pbjsInstance.adUnits.filter returns an array yet the code was expecting an actual ad unit. This fix uses auctionManager.index.getAdUnit to get the ad unit and adds a check for the divId before attempting to render the ad. Integration example has been updated.

Other information

fixes issue #10505

karimMourra avatar Oct 03 '23 19:10 karimMourra