From 81286b283eafce3ecc3cc6cf6177ab1dfdae2722 Mon Sep 17 00:00:00 2001 From: Krzysztof SIEG Date: Thu, 7 Aug 2025 10:16:43 +0200 Subject: [PATCH] Fixes after review https://github.com/prebid/Prebid.js/pull/13655 --- libraries/equativUtils/equativUtils.js | 10 +++++----- modules/sharethroughBidAdapter.js | 11 +++-------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/libraries/equativUtils/equativUtils.js b/libraries/equativUtils/equativUtils.js index b125731dd31..56b3c45861e 100644 --- a/libraries/equativUtils/equativUtils.js +++ b/libraries/equativUtils/equativUtils.js @@ -163,11 +163,11 @@ export const PID_STORAGE_NAME = 'eqt_pid'; /** * Handles cookie sync logic * - * @param syncOptions - * @param serverResponses - * @param gdprConsent - * @param networkId - * @param storage + * @param {*} syncOptions A sync options object + * @param {*} serverResponses A server responses array + * @param {*} gdprConsent A gdpr consent object + * @param {number} networkId A network id + * @param {*} storage A storage object * @returns {{type: string, url: string}[]} */ export function handleCookieSync(syncOptions, serverResponses, gdprConsent, networkId, storage) { diff --git a/modules/sharethroughBidAdapter.js b/modules/sharethroughBidAdapter.js index ba75fae6dec..6dbbc2cd321 100644 --- a/modules/sharethroughBidAdapter.js +++ b/modules/sharethroughBidAdapter.js @@ -14,7 +14,7 @@ const EQT_ENDPOINT = 'https://ssb.smartadserver.com/api/bid?callerId=233'; const STR_ENDPOINT = `https://btlr.sharethrough.com/universal/v1?supply_id=${SUPPLY_ID}`; const IDENTIFIER_PREFIX = 'Sharethrough:'; -const impIdMap = {}; +let impIdMap = {}; let eqtvNetworkId = 0; let isEqtvTest = null; @@ -98,7 +98,7 @@ export const sharethroughAdapterSpec = { test: 0, }; - req.user = nullish(firstPartyData.user, {}); + req.user = firstPartyData.user ?? {} if (!req.user.ext) req.user.ext = {}; req.user.ext.eids = bidRequests[0].userIdAsEids || []; @@ -199,7 +199,7 @@ export const sharethroughAdapterSpec = { }; impression.video = { - pos: nullish(videoRequest.pos, 0), + pos: videoRequest.pos ?? 0, topframe: inIframe() ? 0 : 1, w, h, @@ -376,9 +376,4 @@ function getProtocol() { return window.location.protocol; } -// stub for ?? operator -function nullish(input, def) { - return input === null || input === undefined ? def : input; -} - registerBidder(sharethroughAdapterSpec);