Skip to content

Commit

Permalink
fix sonobi adapter to use polyfilled Object find
Browse files Browse the repository at this point in the history
  • Loading branch information
snapwich committed Apr 13, 2018
1 parent 2ed32db commit 6d2ed31
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/sonobiBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { registerBidder } from 'src/adapters/bidderFactory';
import { getTopWindowLocation, parseSizesInput } from 'src/utils';
import * as utils from '../src/utils';
import { BANNER, VIDEO } from '../src/mediaTypes';
import find from 'core-js/library/fn/array/find';

const BIDDER_CODE = 'sonobi';
const STR_ENDPOINT = 'https://apex.go.sonobi.com/trinity.json';
Expand Down Expand Up @@ -80,7 +81,7 @@ export const spec = {

Object.keys(bidResponse.slots).forEach(slot => {
const bidId = _getBidIdFromTrinityKey(slot);
const bidRequest = bidderRequests.find(bidReqest => bidReqest.bidId === bidId);
const bidRequest = find(bidderRequests, bidReqest => bidReqest.bidId === bidId);
const videoMediaType = utils.deepAccess(bidRequest, 'mediaTypes.video');
const mediaType = bidRequest.mediaType || (videoMediaType ? 'video' : null);
const createCreative = _creative(mediaType);
Expand Down

0 comments on commit 6d2ed31

Please sign in to comment.