about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorNolan Lawson <nolan@nolanlawson.com>2017-05-25 12:14:40 -0700
committerEugen Rochko <eugen@zeonfederated.com>2017-05-25 21:14:40 +0200
commita6ba004bf56f586661ef2dc1e245e50ce8d759d9 (patch)
tree5bff41ee218c496d6dd493cbec5ad50294d84ebf /app
parentb89ab7e69dd49c68c460488e1d255ba72e8dacab (diff)
Attach ReactPerf to window for easier debugging (#3318)
Diffstat (limited to 'app')
-rw-r--r--app/javascript/mastodon/performance.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/javascript/mastodon/performance.js b/app/javascript/mastodon/performance.js
index 4e89c2196..396c605e4 100644
--- a/app/javascript/mastodon/performance.js
+++ b/app/javascript/mastodon/performance.js
@@ -13,7 +13,9 @@ if (process.env.NODE_ENV === 'development') {
     performance.setResourceTimingBufferSize(Infinity);
   }
   marky = require('marky');
-  require('react-addons-perf').start();
+  // allows us to easily do e.g. ReactPerf.printWasted() while debugging
+  window.ReactPerf = require('react-addons-perf');
+  window.ReactPerf.start();
 }
 
 export function start(name) {