Skip to content

Commit

Permalink
change tostring for ie
Browse files Browse the repository at this point in the history
  • Loading branch information
sayan-mitra committed Sep 8, 2020
1 parent 26ba348 commit fdfdf8b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
16 changes: 10 additions & 6 deletions analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -676,13 +676,17 @@ class Analytics {
);

// try to first send to all integrations, if list populated from BE
succesfulLoadedIntersectClientSuppliedIntegrations.forEach((obj) => {
if (!obj.isFailed || !obj.isFailed()) {
if (obj[type]) {
obj[type](rudderElement);
try {
succesfulLoadedIntersectClientSuppliedIntegrations.forEach((obj) => {
if (!obj.isFailed || !obj.isFailed()) {
if (obj[type]) {
obj[type](rudderElement);
}
}
}
});
});
} catch (err) {
handleError({ message: `[sendToNative]:${err}` });
}

// config plane native enabled destinations, still not completely loaded
// in the page, add the events to a queue and process later
Expand Down
2 changes: 1 addition & 1 deletion integrations/HubSpot/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class HubSpot {
for (const k in traits) {
if (!!Object.getOwnPropertyDescriptor(traits, k) && traits[k]) {
const hubspotkey = k; // k.startsWith("rl_") ? k.substring(3, k.length) : k;
if (toString.call(traits[k]) == "[object Date]") {
if (Object.prototype.toString.call(traits[k]) == "[object Date]") {
traitsValue[hubspotkey] = traits[k].getTime();
} else {
traitsValue[hubspotkey] = traits[k];
Expand Down

0 comments on commit fdfdf8b

Please sign in to comment.