src/adapters/bidderFactory.js
function validBidSize(adUnitCode, bid, bidRequests) {
  if ((bid.width || parseInt(bid.width, 10) === 0) && (bid.height || parseInt(bid.height, 10) === 0)) {
    bid.width = parseInt(bid.width, 10);
    bid.height = parseInt(bid.height, 10);
    return true;
  }

  const adUnit = getBidderRequest(bidRequests, bid.bidderCode, adUnitCode);

  const sizes = adUnit && adUnit.bids && adUnit.bids[0] && adUnit.bids[0].sizes;
  const parsedSizes = parseSizesInput(sizes);

  // if a banner impression has one valid size, we assign that size to any bid
  // response that does not explicitly set width or height
  if (parsedSizes.length === 1) {
    const [ width, height ] = parsedSizes[0].split('x');
    bid.width = parseInt(width, 10);
    bid.height = parseInt(height, 10);
    return true;
  }

  return false;
}
function validBidSize(adUnitCode, bid, bidRequests) {
  if ((bid.width || parseInt(bid.width, 10) === 0) && (bid.height || parseInt(bid.height, 10) === 0)) {
    bid.width = parseInt(bid.width, 10);
    bid.height = parseInt(bid.height, 10);
    return true;
  }

  const adUnit = getBidderRequest(bidRequests, bid.bidderCode, adUnitCode);

  const sizes = adUnit && adUnit.bids && adUnit.bids[0] && adUnit.bids[0].sizes;
  const parsedSizes = parseSizesInput(sizes);

  // if a banner impression has one valid size, we assign that size to any bid
  // response that does not explicitly set width or height
  if (parsedSizes.length === 1) {
    const [ width, height ] = parsedSizes[0].split('x');
    bid.width = parseInt(width, 10);
    bid.height = parseInt(height, 10);
    return true;
  }

  return false;
}
function validBidSize ( adUnitCode , bid , bidRequests ) { if ( ( bid . width || parseInt ( bid . width , 10 ) === 0 ) && ( bid . height || parseInt ( bid . height , 10 ) === 0 ) ) { bid . width = parseInt ( bid . width , 10 ) ; bid . height = parseInt ( bid . height , 10 ) ; return true ; } const adUnit = getBidderRequest ( bidRequests , bid . bidderCode , adUnitCode ) ; const sizes = adUnit && adUnit . bids && adUnit . bids [ 0 ] && adUnit . bids [ 0 ] . sizes ; const parsedSizes = parseSizesInput ( sizes ) ; // if a banner impression has one valid size, we assign that size to any bid // response that does not explicitly set width or height if ( parsedSizes . length === 1 ) { const [ width , height ] = parsedSizes [ 0 ] . split ( 'x' ) ; bid . width = parseInt ( width , 10 ) ; bid . height = parseInt ( height , 10 ) ; return true ; } return false ; }
check that the bid has a width and height set
check that the bid has a width and height set