Skip to content

Commit

Permalink
fix: userId in braze hyrbrid
Browse files Browse the repository at this point in the history
  • Loading branch information
aashishmalik committed Aug 22, 2024
1 parent 025306e commit 65b177f
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,14 @@ class Braze {
*/
// eslint-disable-next-line sonarjs/cognitive-complexity
identify(rudderElement) {
const { message } = rudderElement;
const { userId } = message;

if (this.isHybridModeEnabled) {
window.braze.changeUser(userId);
return;
}

const { message } = rudderElement;
const { userId } = message;
const { context } = message;
const email = context?.traits?.email;
const firstName = context?.traits?.firstName || context?.traits?.firstname;
Expand Down

0 comments on commit 65b177f

Please sign in to comment.