Catch analytics errors (#770)
This commit is contained in:
parent
cce41ebcf1
commit
6bbdb34da0
|
@ -44,7 +44,7 @@ function getDarwinIdentifier() {
|
|||
}
|
||||
|
||||
const mac = iface[0].mac.replace(/:/g, '');
|
||||
return Buffer.from(mac, 'hex');
|
||||
return new Buffer(mac, 'hex');
|
||||
}
|
||||
|
||||
function getLinuxIdentifier() {
|
||||
|
@ -89,7 +89,8 @@ module.exports = function(eventName) {
|
|||
}
|
||||
};
|
||||
|
||||
request(`https://api.mixpanel.com/track/?data=${Buffer.from(JSON.stringify(payload), 'utf8').toString('base64')}&ip=1`);
|
||||
request(`https://api.mixpanel.com/track/?data=${Buffer.from(JSON.stringify(payload), 'utf8').toString('base64')}&ip=1`,
|
||||
() => { /* Analytics failed. Do nothing. */ });
|
||||
}
|
||||
|
||||
if (require.main === module) {
|
||||
|
|
Loading…
Reference in New Issue