Skip to content

Commit

Permalink
adds check for mParticle.Identity
Browse files Browse the repository at this point in the history
  • Loading branch information
SbDove committed Jul 20, 2023
1 parent 4bdd030 commit 1df2cfa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 35 deletions.
19 changes: 2 additions & 17 deletions dist/BrazeKit.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -9929,23 +9929,8 @@ var constructor = function () {
function finishBrazeInitialization(forwarderSettings) {
braze.addSdkMetadata(['mp']);
primeBrazeWebPush();

// var user = {
// getUserIdentities: function() {
// return {
// userIdentities: {
// customerid: 'abc123',
// email: 'test@test.com',
// facebook: 'fbID1',
// },
// };
// },
// getMPID: function() {
// return 'MPID123';
// },
// };

if (forwarderSettings.userIdentificationType === 'MPID' && mParticle.Identity.getCurrentUser().getMPID() != null) {

if (forwarderSettings.userIdentificationType === 'MPID' && mParticle.Identity != null && mParticle.Identity.getCurrentUser().getMPID() != null) {
onUserIdentified(mParticle.Identity.getCurrentUser());
}

Expand Down
19 changes: 2 additions & 17 deletions dist/BrazeKit.iife.js
Original file line number Diff line number Diff line change
Expand Up @@ -9929,23 +9929,8 @@ var mpBrazeKitV4 = (function (exports) {
function finishBrazeInitialization(forwarderSettings) {
braze.addSdkMetadata(['mp']);
primeBrazeWebPush();

// var user = {
// getUserIdentities: function() {
// return {
// userIdentities: {
// customerid: 'abc123',
// email: 'test@test.com',
// facebook: 'fbID1',
// },
// };
// },
// getMPID: function() {
// return 'MPID123';
// },
// };

if (forwarderSettings.userIdentificationType === 'MPID' && mParticle.Identity.getCurrentUser().getMPID() != null) {

if (forwarderSettings.userIdentificationType === 'MPID' && mParticle.Identity != null && mParticle.Identity.getCurrentUser().getMPID() != null) {
onUserIdentified(mParticle.Identity.getCurrentUser());
}

Expand Down
2 changes: 1 addition & 1 deletion src/BrazeKit-dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ var constructor = function () {
braze.addSdkMetadata(['mp']);
primeBrazeWebPush();

if (forwarderSettings.userIdentificationType === 'MPID' && mParticle.Identity.getCurrentUser().getMPID() != null) {
if (forwarderSettings.userIdentificationType === 'MPID' && mParticle.Identity != null && mParticle.Identity.getCurrentUser().getMPID() != null) {
onUserIdentified(mParticle.Identity.getCurrentUser())
}

Expand Down

0 comments on commit 1df2cfa

Please sign in to comment.