@@ -155,14 +155,14 @@ var constructor = function () {
155155 return data ;
156156 }
157157
158- // function replaceEmailIdentityWithEmailsha256 (_data) {
159- // var data = mergeObjects({}, _data || {});
160- // if (_data.hasOwnProperty(EMAIL_SHA256_IDENTITY)) {
161- // delete data[EMAIL_IDENTITY];
162- // }
158+ function sanitizeIdentities ( _data ) {
159+ var data = mergeObjects ( { } , _data || { } ) ;
160+ if ( _data . hasOwnProperty ( EMAIL_SHA256_IDENTITY ) ) {
161+ delete data [ EMAIL_IDENTITY ] ;
162+ }
163163
164- // return data;
165- // }
164+ return data ;
165+ }
166166
167167 /**
168168 * Selects placements for Rokt Web SDK with merged attributes, filters, and experimentation options
@@ -209,7 +209,6 @@ var constructor = function () {
209209 : { } ;
210210
211211 var filteredUserIdentities = returnUserIdentities ( filteredUser ) ;
212- console . log ( filteredUserIdentities ) ;
213212
214213 var selectPlacementsAttributes = mergeObjects (
215214 filteredUserIdentities ,
@@ -219,9 +218,9 @@ var constructor = function () {
219218 mpid : mpid ,
220219 }
221220 ) ;
222- console . log ( selectPlacementsAttributes ) ;
221+
223222 var selectPlacementsOptions = mergeObjects ( options , {
224- attributes : selectPlacementsAttributes ,
223+ attributes : sanitizeIdentities ( selectPlacementsAttributes ) ,
225224 } ) ;
226225
227226 return self . launcher . selectPlacements ( selectPlacementsOptions ) ;
0 commit comments