Skip to content

Commit

Permalink
Merge branch 'develop' into dependabot/npm_and_yarn/eslint-plugin-pre…
Browse files Browse the repository at this point in the history
…ttier-5.2.1
  • Loading branch information
sanpj2292 authored Sep 3, 2024
2 parents 9018165 + 6ba16f6 commit 653a6e4
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const sha256 = require('sha256');
const SqlString = require('sqlstring');
const isString = require('lodash/isString');
const { get, set, cloneDeep } = require('lodash');
const {
AbortedError,
Expand Down Expand Up @@ -271,7 +272,9 @@ const getAddConversionPayload = (message, Config) => {

const userIdentifierInfo = {
email:
hashUserIdentifier && isDefinedAndNotNull(email) ? sha256(email.trim()).toString() : email,
hashUserIdentifier && isString(email) && isDefinedAndNotNull(email)
? sha256(email.trim()).toString()
: email,
phone:
hashUserIdentifier && isDefinedAndNotNull(phone) ? sha256(phone.trim()).toString() : phone,
address: buildAndGetAddress(message, hashUserIdentifier),
Expand Down Expand Up @@ -367,7 +370,9 @@ const getClickConversionPayloadAndEndpoint = (

const userIdentifierInfo = {
email:
hashUserIdentifier && isDefinedAndNotNull(email) ? sha256(email.trim()).toString() : email,
hashUserIdentifier && isString(email) && isDefinedAndNotNull(email)
? sha256(email.trim()).toString()
: email,
phone:
hashUserIdentifier && isDefinedAndNotNull(phone) ? sha256(phone.trim()).toString() : phone,
};
Expand Down

0 comments on commit 653a6e4

Please sign in to comment.