File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -1085,7 +1085,7 @@ module('userId', attachIdSystem);
1085
1085
1086
1086
export function setOrtbUserExtEids ( ortbRequest , bidderRequest , context ) {
1087
1087
const eids = deepAccess ( context , 'bidRequests.0.userIdAsEids' ) ;
1088
- if ( eids ) {
1088
+ if ( eids && Object . keys ( eids ) . length > 0 ) {
1089
1089
deepSetValue ( ortbRequest , 'user.ext.eids' , eids ) ;
1090
1090
}
1091
1091
}
Original file line number Diff line number Diff line change @@ -18,4 +18,16 @@ describe('pbjs - ortb user eids', () => {
18
18
setOrtbUserExtEids ( req , { } , [ { } ] ) ;
19
19
expect ( req ) . to . eql ( { } ) ;
20
20
} )
21
+
22
+ it ( 'has no effect if user.ext.eids is an empty array' , ( ) => {
23
+ const req = { } ;
24
+ setOrtbUserExtEids ( req , { } , {
25
+ bidRequests : [
26
+ {
27
+ userIdAsEids : [ ]
28
+ }
29
+ ]
30
+ } ) ;
31
+ expect ( req ) . to . eql ( { } ) ;
32
+ } ) ;
21
33
} )
You can’t perform that action at this time.
0 commit comments