diff --git a/src/BrazeKit-dev.js b/src/BrazeKit-dev.js index 82a307a..3a3d23a 100644 --- a/src/BrazeKit-dev.js +++ b/src/BrazeKit-dev.js @@ -794,9 +794,12 @@ var constructor = function () { braze.addSdkMetadata(['mp']); primeBrazeWebPush(); - const currentUser = mParticle.Identity != null ? mParticle.Identity.getCurrentUser() : null; - const mpid = currentUser.getMPID(); - + const currentUser = + mParticle.Identity !== null + ? mParticle.Identity.getCurrentUser() + : null; + const mpid = currentUser ? currentUser.getMPID() : null; + if (currentUser && mpid) { onUserIdentified(currentUser); }