From 39776d7e2772395d5c74c1d3e98d0b6ed232e840 Mon Sep 17 00:00:00 2001 From: Robert Ray Martinez III Date: Thu, 17 Mar 2022 05:51:14 -0700 Subject: [PATCH] Rubicon Analytics: handle bad auction case (#8192) * handle bad auction * rename auctionCache --- modules/rubiconAnalyticsAdapter.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/rubiconAnalyticsAdapter.js b/modules/rubiconAnalyticsAdapter.js index 41df83deb1d..55877a43d38 100644 --- a/modules/rubiconAnalyticsAdapter.js +++ b/modules/rubiconAnalyticsAdapter.js @@ -866,7 +866,12 @@ let rubiconAdapter = Object.assign({}, baseAdapter, { break; case AUCTION_END: // see how long it takes for the payload to come fire - cache.auctions[args.auctionId].endTs = Date.now(); + let auctionData = cache.auctions[args.auctionId]; + // if for some reason the auction did not do its normal thing, this could be undefied so bail + if (!auctionData) { + break; + } + auctionData.endTs = Date.now(); const isOnlyInstreamAuction = args.adUnits && args.adUnits.every(adUnit => adUnitIsOnlyInstream(adUnit)); // If only instream, do not wait around, just send payload