Skip to content

Commit

Permalink
priceFloors: do not log error on missing floor definitions (prebid#11037
Browse files Browse the repository at this point in the history
)
  • Loading branch information
dgirardi authored Feb 1, 2024
1 parent 30513cf commit 7d3ff58
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
8 changes: 4 additions & 4 deletions modules/id5IdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,26 +51,26 @@ export const storage = getStorageManager({moduleType: MODULE_TYPE_UID, moduleNam
* @property {string} [universal_uid] - The encrypted ID5 ID to pass to bidders
* @property {Object} [ext] - The extensions object to pass to bidders
* @property {Object} [ab_testing] - A/B testing configuration
*/
*/

/**
* @typedef {Object} FetchCallConfig
* @property {string} [url] - The URL for the fetch endpoint
* @property {Object} [overrides] - Overrides to apply to fetch parameters
*/
*/

/**
* @typedef {Object} ExtensionsCallConfig
* @property {string} [url] - The URL for the extensions endpoint
* @property {string} [method] - Overrides the HTTP method to use to make the call
* @property {Object} [body] - Specifies a body to pass to the extensions endpoint
*/
*/

/**
* @typedef {Object} DynamicConfig
* @property {FetchCallConfig} [fetchCall] - The fetch call configuration
* @property {ExtensionsCallConfig} [extensionsCall] - The extensions call configuration
*/
*/

/**
* @typedef {Object} ABTestingConfig
Expand Down
9 changes: 6 additions & 3 deletions modules/priceFloors.js
Original file line number Diff line number Diff line change
Expand Up @@ -445,10 +445,13 @@ export function continueAuction(hookConfig) {
}

function validateSchemaFields(fields) {
if (Array.isArray(fields) && fields.length > 0 && fields.every(field => allowedFields.indexOf(field) !== -1)) {
return true;
if (Array.isArray(fields) && fields.length > 0) {
if (fields.every(field => allowedFields.includes(field))) {
return true;
} else {
logError(`${MODULE_NAME}: Fields received do not match allowed fields`);
}
}
logError(`${MODULE_NAME}: Fields received do not match allowed fields`);
return false;
}

Expand Down

0 comments on commit 7d3ff58

Please sign in to comment.