Skip to content

Commit fd9e031

Browse files
authored
Fix when dataItem.name is undefined (#12734)
1 parent ff56019 commit fd9e031

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/gumgumBidAdapter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -497,8 +497,8 @@ function buildRequests(validBidRequests, bidderRequest) {
497497
export function getCids(site) {
498498
if (site.content && Array.isArray(site.content.data)) {
499499
for (const dataItem of site.content.data) {
500-
if (dataItem.name.includes('iris.com') || dataItem.name.includes('iris.tv')) {
501-
return dataItem.ext.cids.join(',');
500+
if (typeof dataItem?.name === 'string' && (dataItem.name.includes('iris.com') || dataItem.name.includes('iris.tv'))) {
501+
return Array.isArray(dataItem.ext?.cids) ? dataItem.ext.cids.join(',') : '';
502502
}
503503
}
504504
}

0 commit comments

Comments
 (0)