Skip to content

Commit

Permalink
Fix inf loop (#7460)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlb7687 authored Sep 23, 2021
1 parent 5b07374 commit a548237
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/ixBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ function buildRequest(validBidRequests, bidderRequest, impressions, version) {

let currentImpressionSize = encodeURIComponent(JSON.stringify({ impressionObjects })).length;

while (currentImpressionSize > remainingRequestSize) {
while (impressionObjects.length && currentImpressionSize > remainingRequestSize) {
wasAdUnitImpressionsTrimmed = true;
impressionObjects.pop();
currentImpressionSize = encodeURIComponent(JSON.stringify({ impressionObjects })).length;
Expand Down

0 comments on commit a548237

Please sign in to comment.