Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions modules/adagioAnalyticsAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function removeDuplicates(arr, getKey) {
const seen = {};
return arr.filter(item => {
const key = getKey(item);
return seen.hasOwnProperty(key) ? false : (seen[key] = true);
return Object.prototype.hasOwnProperty.call(seen, key) ? false : (seen[key] = true);
});
};

Expand Down Expand Up @@ -231,7 +231,7 @@ function handlerAuctionInit(event) {
mediaTypeKey => mediaTypeKey
).map(mediaType => getMediaTypeAlias(mediaType)).sort();
const bannerSizes = removeDuplicates(
mediaTypes.filter(mediaType => mediaType.hasOwnProperty(BANNER) && mediaType[BANNER].hasOwnProperty('sizes'))
mediaTypes.filter(mediaType => Object.prototype.hasOwnProperty.call(mediaType, BANNER) && Object.prototype.hasOwnProperty.call(mediaType[BANNER], 'sizes'))
.map(mediaType => mediaType[BANNER].sizes.map(size => size.join('x')))
.flat(),
bannerSize => bannerSize
Expand Down
100 changes: 46 additions & 54 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
"plugin-error": "^2.0.1",
"puppeteer": "^24.10.0",
"resolve-from": "^5.0.0",
"sinon": "^20.0.0",
"sinon": "^22.0.0",
"through2": "^4.0.2",
"typescript": "^5.8.2",
"typescript-eslint": "^8.26.1",
Expand Down
4 changes: 2 additions & 2 deletions test/spec/libraries/cmp/cmpClient_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ describe('cmpClient', () => {
});
sinon.assert.calledWithMatch(messenger, sinon.match((arg) => {
return arg.mockApiCall.command === 'cmd' &&
!arg.mockApiCall.hasOwnProperty('parameter');
!Object.prototype.hasOwnProperty.call(arg.mockApiCall, 'parameter');
}))
});

Expand All @@ -202,7 +202,7 @@ describe('cmpClient', () => {
command: 'cmd',
callback: cb
});
sinon.assert.calledWithMatch(messenger, sinon.match(arg => !arg.mockApiCall.hasOwnProperty('callback')));
sinon.assert.calledWithMatch(messenger, sinon.match(arg => !Object.prototype.hasOwnProperty.call(arg.mockApiCall, 'callback')));
sinon.assert.called(cb);
});

Expand Down
Loading
Loading