Skip to content

Commit

Permalink
use imported find (prebid#2614)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkendall07 authored and AdSpacesDevelopers committed Jan 30, 2019
1 parent 950704f commit 5033e8b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/criteoBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { loadExternalScript } from 'src/adloader';
import { registerBidder } from 'src/adapters/bidderFactory';
import { parse } from 'src/url';
import * as utils from 'src/utils';
import find from 'core-js/library/fn/array/find';

const ADAPTER_VERSION = 7;
const BIDDER_CODE = 'criteo';
Expand Down Expand Up @@ -83,7 +84,7 @@ export const spec = {

if (body && body.slots && utils.isArray(body.slots)) {
body.slots.forEach(slot => {
const bidRequest = request.bidRequests.find(b => b.adUnitCode === slot.impid && (!b.params.zoneId || parseInt(b.params.zoneId) === slot.zoneid));
const bidRequest = find(request.bidRequests, b => b.adUnitCode === slot.impid && (!b.params.zoneId || parseInt(b.params.zoneId) === slot.zoneid));
const bidId = bidRequest.bidId;
const bid = {
requestId: bidId,
Expand Down

0 comments on commit 5033e8b

Please sign in to comment.