Skip to content

Commit

Permalink
Yahoo Bid Adapter: Support IE11 -> includes to indexOf (prebid#7627)
Browse files Browse the repository at this point in the history
* includes to indexOf

* lint
  • Loading branch information
robertrmartinez authored and Chris Pabst committed Jan 10, 2022
1 parent cd03af2 commit 8d9a295
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions modules/yahoosspBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ function getAdapterMode() {

function getResponseFormat(bid) {
const adm = bid.adm;
if (adm.includes('o2playerSettings') || adm.includes('YAHOO.VideoPlatform.VideoPlayer') || adm.includes('AdPlacement')) {
if (adm.indexOf('o2playerSettings') !== -1 || adm.indexOf('YAHOO.VideoPlatform.VideoPlayer') !== -1 || adm.indexOf('AdPlacement') !== -1) {
return BANNER;
} else if (adm.includes('VAST')) {
} else if (adm.indexOf('VAST') !== -1) {
return VIDEO;
}
};
Expand Down Expand Up @@ -188,23 +188,23 @@ function validateAppendObject(validationType, allowedKeys, inputObject, appendTo
for (const objectKey in inputObject) {
switch (validationType) {
case 'string':
if (allowedKeys.includes(objectKey) && isStr(inputObject[objectKey])) {
if (allowedKeys.indexOf(objectKey) !== -1 && isStr(inputObject[objectKey])) {
outputObject[objectKey] = inputObject[objectKey];
};
break;
case 'number':
if (allowedKeys.includes(objectKey) && isNumber(inputObject[objectKey])) {
if (allowedKeys.indexOf(objectKey) !== -1 && isNumber(inputObject[objectKey])) {
outputObject[objectKey] = inputObject[objectKey];
};
break;

case 'array':
if (allowedKeys.includes(objectKey) && isArray(inputObject[objectKey])) {
if (allowedKeys.indexOf(objectKey) !== -1 && isArray(inputObject[objectKey])) {
outputObject[objectKey] = inputObject[objectKey];
};
break;
case 'object':
if (allowedKeys.includes(objectKey) && isPlainObject(inputObject[objectKey])) {
if (allowedKeys.indexOf(objectKey) !== -1 && isPlainObject(inputObject[objectKey])) {
outputObject[objectKey] = inputObject[objectKey];
};
break;
Expand Down

0 comments on commit 8d9a295

Please sign in to comment.