Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcin Komorski authored and Marcin Komorski committed Sep 17, 2024
1 parent 7de083c commit 674efe8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/adapterManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ adapterManager.aliasBidAdapter = function (bidderCode, alias, options) {
const { useBaseGvlid = false } = options || {};
let spec = bidAdapter.getSpec();
const gvlid = useBaseGvlid ? spec.gvlid : options?.gvlid;
if (!useBaseGvlid && spec.gvlid != null && options?.gvlid == null) {
if (gvlid == null && spec.gvlid != null) {
logWarn(`Alias '${alias}' will NOT re-use the GVL ID of the original adapter ('${spec.code}', gvlid: ${spec.gvlid}). Functionality that requires TCF consent may not work as expected.`)
}

Expand Down
3 changes: 1 addition & 2 deletions test/spec/unit/core/adapterManager_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1632,9 +1632,8 @@ describe('adapterManager tests', function () {
});

it('should use gvlid of original adapter when option set', () => {
const mediaType = FEATURES.VIDEO ? 'video' : 'banner'
const gvlid = 'origvlid';
let thisSpec = Object.assign(spec, { supportedMediaTypes: [mediaType], gvlid });
let thisSpec = Object.assign(spec, { gvlid });
registerBidder(thisSpec);
const alias = 'bidderWithGvlid';
adapterManager.aliasBidAdapter(CODE, alias, {useBaseGvlid: true});
Expand Down

0 comments on commit 674efe8

Please sign in to comment.