@@ -23,7 +23,6 @@ var constructor = function () {
2323 } ;
2424
2525 var EMAIL_SHA256_KEY = 'emailsha256' ;
26- var EMAIL_KEY = 'email' ;
2726
2827 // Dynamic identity type for Rokt's emailsha256 identity value which MP doesn't natively support - will be set during initialization
2928 var mappedEmailSha256Key ;
@@ -185,24 +184,15 @@ var constructor = function () {
185184
186185 function replaceOtherIdentityWithEmailsha256 ( userIdentities ) {
187186 var newUserIdentities = mergeObjects ( { } , userIdentities || { } ) ;
188- if ( userIdentities . hasOwnProperty ( mappedEmailSha256Key ) ) {
187+ if ( userIdentities [ mappedEmailSha256Key ] ) {
189188 newUserIdentities [ EMAIL_SHA256_KEY ] =
190189 userIdentities [ mappedEmailSha256Key ] ;
191- delete newUserIdentities [ mappedEmailSha256Key ] ;
192190 }
191+ delete newUserIdentities [ mappedEmailSha256Key ] ;
193192
194193 return newUserIdentities ;
195194 }
196195
197- function sanitizeEmailIdentities ( _data ) {
198- var data = mergeObjects ( { } , _data || { } ) ;
199- if ( _data . hasOwnProperty ( EMAIL_SHA256_KEY ) ) {
200- delete data [ EMAIL_KEY ] ;
201- }
202-
203- return data ;
204- }
205-
206196 /**
207197 * Selects placements for Rokt Web SDK with merged attributes, filters, and experimentation options
208198 * @see https://docs.rokt.com/developers/integration-guides/web/library/select-placements-options/
@@ -262,7 +252,7 @@ var constructor = function () {
262252 ) ;
263253
264254 var selectPlacementsOptions = mergeObjects ( options , {
265- attributes : sanitizeEmailIdentities ( selectPlacementsAttributes ) ,
255+ attributes : selectPlacementsAttributes ,
266256 } ) ;
267257
268258 return self . launcher . selectPlacements ( selectPlacementsOptions ) ;
0 commit comments