From 0d917b08ed819a6dc1fdfb9f1388d074a979e499 Mon Sep 17 00:00:00 2001
From: George Goldberg <george@gberg.me>
Date: Wed, 22 Mar 2017 20:17:27 +0000
Subject: Fix telemetry. (#5841)

---
 webapp/components/root.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'webapp/components/root.jsx')

diff --git a/webapp/components/root.jsx b/webapp/components/root.jsx
index 06a22f395..07c4415f5 100644
--- a/webapp/components/root.jsx
+++ b/webapp/components/root.jsx
@@ -31,7 +31,7 @@ export default class Root extends React.Component {
 
         // Ya....
         /*eslint-disable */
-        if (segmentKey != null && segmentKey !== '' && window.mm_config.DiagnosticsEnabled) {
+        if (segmentKey != null && segmentKey !== '' && window.mm_config.DiagnosticsEnabled === 'true') {
             !function(){var analytics=global.window.analytics=global.window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","group","track","ready","alias","page","once","off","on"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t<analytics.methods.length;t++){var e=analytics.methods[t];analytics[e]=analytics.factory(e)}analytics.load=function(t){var e=document.createElement("script");e.type="text/javascript";e.async=!0;e.src=("https:"===document.location.protocol?"https://":"http://")+"cdn.segment.com/analytics.js/v1/"+t+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n)};analytics.SNIPPET_VERSION="3.0.1";
                 analytics.load(segmentKey);
 
-- 
cgit v1.2.3-1-g7c22

