diff --git a/modules/ixBidAdapter.js b/modules/ixBidAdapter.js index 8f821e87911..4ff84e7c104 100644 --- a/modules/ixBidAdapter.js +++ b/modules/ixBidAdapter.js @@ -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;