mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-05-12 13:52:56 +00:00
Fix bug of using mixpanel module as the mixpanel client
This commit is contained in:
parent
e622491f37
commit
7b483e983d
@ -11,7 +11,7 @@ exports.getSupervisorVersion = ->
|
|||||||
obj = JSON.parse data
|
obj = JSON.parse data
|
||||||
return obj.version
|
return obj.version
|
||||||
|
|
||||||
mixpanel.init(config.mixpanelToken)
|
mixpanelClient = mixpanel.init(config.mixpanelToken)
|
||||||
|
|
||||||
exports.mixpanelProperties = mixpanelProperties =
|
exports.mixpanelProperties = mixpanelProperties =
|
||||||
username: require('/boot/config.json').username
|
username: require('/boot/config.json').username
|
||||||
@ -20,4 +20,4 @@ exports.mixpanelTrack = (event, properties={}) ->
|
|||||||
# Mutation is bad, and it should feel bad
|
# Mutation is bad, and it should feel bad
|
||||||
properties = _.assign(_.cloneDeep(properties), mixpanelProperties)
|
properties = _.assign(_.cloneDeep(properties), mixpanelProperties)
|
||||||
|
|
||||||
mixpanel.track(event, properties)
|
mixpanelClient.track(event, properties)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user