Skip to content

Commit

Permalink
Fixed LGTM alerts and merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Loughrey committed Oct 19, 2021
1 parent b6a527d commit a9cc221
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -591,8 +591,8 @@ export function newConfig() {
let prop = (topic === 'fpd') ? 'ortb2' : topic;
let option = (topic === 'fpd') ? convertFpd(config.config[topic]) : config.config[topic];

if (utils.isPlainObject(option)) {
const func = mergeFlag ? utils.mergeDeep : Object.assign;
if (isPlainObject(option)) {
const func = mergeFlag ? mergeDeep : Object.assign;
bidderConfig[bidder][prop] = func({}, bidderConfig[bidder][prop] || {}, option);
} else {
bidderConfig[bidder][prop] = option;
Expand All @@ -617,14 +617,14 @@ export function newConfig() {
}

function mergeConfig(obj) {
if (!utils.isPlainObject(obj)) {
utils.logError('mergeConfig input must be an object');
if (!isPlainObject(obj)) {
logError('mergeConfig input must be an object');
return;
}

const mergedConfig = Object.keys(obj).reduce((accum, key) => {
const prevConf = _getConfig(key)[key] || {};
accum[key] = utils.mergeDeep(prevConf, obj[key]);
const prevConf = getConfig(key)[key] || {};
accum[key] = mergeDeep(prevConf, obj[key]);
return accum;
}, {});

Expand Down

0 comments on commit a9cc221

Please sign in to comment.