Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent TripleLift TypeError #662

Merged
merged 1 commit into from
Sep 30, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/adapters/triplelift.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ var TripleLiftAdapter = function TripleLiftAdapter() {
$$PREBID_GLOBAL$$.TLCB = function(tlResponseObj) {
if (tlResponseObj && tlResponseObj.callback_id) {
var bidObj = utils.getBidRequest(tlResponseObj.callback_id);
var placementCode = bidObj.placementCode;
var placementCode = bidObj && bidObj.placementCode;

// @if NODE_ENV='debug'
utils.logMessage('JSONP callback function called for inventory code: ' + bidObj.params.inventoryCode);
if (bidObj) {utils.logMessage('JSONP callback function called for inventory code: ' + bidObj.params.inventoryCode);}
// @endif

var bid = [];
Expand All @@ -97,7 +97,7 @@ var TripleLiftAdapter = function TripleLiftAdapter() {
} else {
//no response data
// @if NODE_ENV='debug'
utils.logMessage('No prebid response from TripleLift for inventory code: ' + bidObj.params.inventoryCode);
if (bidObj) {utils.logMessage('No prebid response from TripleLift for inventory code: ' + bidObj.params.inventoryCode);}
// @endif
bid = bidfactory.createBid(2, bidObj);
bid.bidderCode = 'triplelift';
Expand Down