-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Get bid responses #3492
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small tweak
src/auctionManager.js
Outdated
@@ -100,6 +100,10 @@ export function newAuctionManager() { | |||
} | |||
} | |||
|
|||
auctionManager.getLastAuctionId = function() { | |||
return _auctions && _auctions.length && _auctions[_auctions.length - 1].getAuctionId() |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
made the change thanks
* 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
Type of change
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 auctiongetBidResponses
will return empty object