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

Initial value 0 for adder. #656

Merged
merged 1 commit into from
Sep 30, 2016
Merged

Conversation

CarsonBanov
Copy link
Contributor

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
  • Other

Description of change

If no bidders are added to the prebid bid object, bidsBackAll will throw a type error of "Attempt to reduce empty array with no initial value".

pbjs.addAdUnits([{
    code: code
    sizes: sizes
    bids: []
}]);

The bids: [] is the problem. With this change, there is an initial value of 0 (which works because of adding), and it won't throw.

@CarsonBanov
Copy link
Contributor Author

@mkendall07 This one is low priority I think, but also a small change.

@mkendall07
Copy link
Member

LGTM. Thanks!

@mkendall07 mkendall07 merged commit 8660309 into prebid:master Sep 30, 2016
Studnicky pushed a commit to sonobi/Prebid.js that referenced this pull request Oct 4, 2016
marian-r pushed a commit to aol/Prebid.js that referenced this pull request Nov 2, 2016
…ebid-0.13.1 to release/1.4.0

* commit 'd174ef271e55e7f26210f50caac52c0a036bc9a1':
  CHANGELOG.
  0.13.1 release
  add an --https flag to run local dev server over https (prebid#670)
  test ie variant of url parse pathname (prebid#669)
  Prevent SpringServe TypeError (prebid#663)
  XDomainRequest does not support `readyState` and was not executing the callback. (prebid#668)
  Prevent Sovrn TypeError (prebid#664)
  Prevent TripleLift TypeError (prebid#662)
  fixed bug with using non standard "standard" keys and sendAllBids (prebid#665)
  Initial value 0 for adder. (prebid#656)
  Prevent bidmanager TypeError (prebid#661)
  Prevent Pubmatic TypeError (prebid#666)
  Size mapping functionality (prebid#651)
  Added '320x80': 59, '320x320': 72, '320x160': 73 to RUBICON_SIZE_MAP (prebid#649)
  Add defy alias + increment version. (prebid#650)
  Add additional sizes to rubicon size mapping (prebid#646)
marian-r added a commit to aol/Prebid.js that referenced this pull request Nov 2, 2016
…4.0 to master

* commit '5e7eec42d84ec5de47a28ba493a9357b595761d3':
  CHANGELOG.
  New adapter.
  0.13.1 release
  add an --https flag to run local dev server over https (prebid#670)
  test ie variant of url parse pathname (prebid#669)
  Prevent SpringServe TypeError (prebid#663)
  XDomainRequest does not support `readyState` and was not executing the callback. (prebid#668)
  Prevent Sovrn TypeError (prebid#664)
  Prevent TripleLift TypeError (prebid#662)
  fixed bug with using non standard "standard" keys and sendAllBids (prebid#665)
  Initial value 0 for adder. (prebid#656)
  Prevent bidmanager TypeError (prebid#661)
  Prevent Pubmatic TypeError (prebid#666)
  Size mapping functionality (prebid#651)
  Added '320x80': 59, '320x320': 72, '320x160': 73 to RUBICON_SIZE_MAP (prebid#649)
  Add defy alias + increment version. (prebid#650)
  Add additional sizes to rubicon size mapping (prebid#646)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants