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

removeComplete() potential bug

Open anxobotana opened this issue 10 years ago • 1 comments

removeComplete() doesn't clear _bidsReceived with empty or error status. The array keeps growing with bids having an empty or error status every time an ad unit is refreshed.

the current code is ( prebid.js line ~270 ):

  // also remove bids that have an empty or error status so known as not pending for render
  responses.filter(bid => bid.getStatusCode && bid.getStatusCode() === 2)
    .forEach(bid => responses.slice(responses.indexOf(bid), 1));

and it should be splice instead of slice or am i missing something?

anxobotana avatar Sep 02 '16 10:09 anxobotana

Thanks @anxobotana , and please feel free to open a PR if it's taking too long for these quick fixes :)

protonate avatar Sep 15 '16 22:09 protonate