File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -197,7 +197,7 @@ export default class RoktManager {
197197 // Hashed email identity is valid if it is set to Other-Other10
198198 if ( this . mappedEmailShaIdentityType && IdentityType . getIdentityType ( this . mappedEmailShaIdentityType ) !== false ) {
199199 currentHashedEmail = currentUserIdentities [ this . mappedEmailShaIdentityType ] ;
200- newHashedEmail = mappedAttributes [ 'emailsha256' ] as string || undefined ;
200+ newHashedEmail = mappedAttributes [ 'emailsha256' ] as string || mappedAttributes [ this . mappedEmailShaIdentityType ] as string || undefined ;
201201 }
202202
203203 const emailChanged = this . hasIdentityChanged ( currentEmail , newEmail ) ;
@@ -344,15 +344,15 @@ export default class RoktManager {
344344 this . logger ?. verbose ( `RoktManager: Processing ${ this . messageQueue . size } queued messages` ) ;
345345
346346 this . messageQueue . forEach ( ( message ) => {
347- if ( ! ( message . methodName in this . kit ) || ! isFunction ( this . kit [ message . methodName ] ) ) {
347+ if ( ! ( message . methodName in this ) || ! isFunction ( this [ message . methodName ] ) ) {
348348 this . logger ?. error ( `RoktManager: Method ${ message . methodName } not found in kit` ) ;
349349 return ;
350350 }
351351
352352 this . logger ?. verbose ( `RoktManager: Processing queued message: ${ message . methodName } with payload: ${ JSON . stringify ( message . payload ) } ` ) ;
353353
354354 try {
355- const result = ( this . kit [ message . methodName ] as Function ) ( message . payload ) ;
355+ const result = ( this [ message . methodName ] as Function ) ( message . payload ) ;
356356 this . completePendingPromise ( message . messageId , result ) ;
357357 } catch ( error ) {
358358 const errorMessage = error instanceof Error ? error . message : String ( error ) ;
You can’t perform that action at this time.
0 commit comments