Skip to content

Commit

Permalink
changes for timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
prabrisha-rudder committed Nov 27, 2019
1 parent c99020d commit d71583d
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,15 @@ class HubSpot {
for (let k in traits) {
if (!!Object.getOwnPropertyDescriptor(traits, k) && traits[k]) {
let hubspotkey = k;//k.startsWith("rl_") ? k.substring(3, k.length) : k;
traitsValue[hubspotkey] = traits[k];
if(toString.call(traits[k]) == '[object Date]'){
traitsValue[hubspotkey] = traits[k].getTime();
} else {
traitsValue[hubspotkey] = traits[k];
}
}

}
if (traitsValue["address"]) {
/* if (traitsValue["address"]) {
let address = traitsValue["address"];
//traitsValue.delete(address)
delete traitsValue["address"];
Expand All @@ -37,7 +42,7 @@ class HubSpot {
traitsValue[hubspotkey] = address[k];
}
}
}
} */
let userProperties = rudderElement.message.context.user_properties;
for (let k in userProperties) {
if (
Expand Down

0 comments on commit d71583d

Please sign in to comment.