From a6ba004bf56f586661ef2dc1e245e50ce8d759d9 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Thu, 25 May 2017 12:14:40 -0700 Subject: [PATCH] Attach ReactPerf to window for easier debugging (#3318) --- app/javascript/mastodon/performance.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/javascript/mastodon/performance.js b/app/javascript/mastodon/performance.js index 4e89c219641..396c605e4c8 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) {