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

Get bid responses #3492

Merged
merged 21 commits into from
Jan 29, 2019
Merged

Get bid responses #3492

merged 21 commits into from
Jan 29, 2019

Conversation

deekshithraop
Copy link
Contributor

Type of change

  • [x ] Bugfix
  • [x ] Feature

Description of change

$$PREBID_GLOBAL$$.getBidResponses will return the responses of the of the last auction if there are successful bids(i.e last auctionId is determined based on the last response returned), But last auction may not have any responses. This pull req will fix that if there are no responses in the last auction getBidResponses will return empty object

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

Copy link
Collaborator

@snapwich snapwich left a comment

Choose a reason for hiding this comment

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

One small tweak

@@ -100,6 +100,10 @@ export function newAuctionManager() {
}
}

auctionManager.getLastAuctionId = function() {
return _auctions && _auctions.length && _auctions[_auctions.length - 1].getAuctionId()
Copy link
Collaborator

Choose a reason for hiding this comment

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

_auctions should always be an Array (it's initialized as an array (with let, might want to switch to const to make sure that's always the case)), so I think all these checks are unnecessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

made the change thanks

jacekburys-quantcast pushed a commit to jacekburys-quantcast/Prebid.js that referenced this pull request May 15, 2019
* 3413-Insert Iframes for user sync in body

* Append Iframe as the last child

* Add unit test for insertElement

* utls insert element at the top by default

* add unit tests for utls insert element

* Insert iframe as html last child

* revert package.lock changes

* Override keywords in setTargetingForAst

* Add resetPresetTargetingAST for setTargetingForAst

* get bidresponses form last auction Id

* ignore getbidresponses unit test

* Add unit test for getBidResponses

* fix typo

* Add unit test for getBidResponses

* code review changes

* add minor check
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.

4 participants