<p dir="auto">After upgrading to React 15.0.1 or 15.1.0 I'm not able to use printWasted from Perf tools.</p>
<p dir="auto">React 15.0.1 throws error:<br>
<code class="notranslate">ReactDefaultPerfAnalysis.js:177 Uncaught TypeError: Cannot read property 'forEach' of undefined(…)</code></p>
<p dir="auto">React 15.1.0<br>
<code class="notranslate">warning.js:44 Warning: There is an internal error in the React performance measurement code. We did not expect componentDidMount timer to stop while no timer is still in progress for another instance. Please report this as a bug in React</code></p>
<p dir="auto">I discovered that error is connected with returning <code class="notranslate">null</code>. A lot of my components have something like that</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="render: function() {
  if (!this.props.visible) {
    return null;
  }
  // ...
}"><pre class="notranslate"><code class="notranslate">render: function() {
  if (!this.props.visible) {
    return null;
  }
  // ...
}
</code></pre></div>
<p dir="auto">And when I try to measure one of those components I will get above error. Removing conditions from components fixes problem.</p>
<p dir="auto">After upgrading to 15.1.0 I'm having trouble using the React Perf tools. I've done the following:</p>
<p dir="auto">Added to one of my files:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import Perf from 'react-addons-perf';
window.Perf = Perf;"><pre class="notranslate"><code class="notranslate">import Perf from 'react-addons-perf';
window.Perf = Perf;
</code></pre></div>
<p dir="auto">I then launch my app in Chrome. Open the Dev Tools and run this in the console:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Perf.start();
Perf.stop();
Perf.printWasted();"><pre class="notranslate"><code class="notranslate">Perf.start();
Perf.stop();
Perf.printWasted();
</code></pre></div>
<p dir="auto">And I get:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TypeError: Cannot read property 'forEach' of undefined
getWasted   @   7.7.js:149515
printWasted @   7.7.js:149666
(anonymous function)    @   VM508:1"><pre class="notranslate"><code class="notranslate">TypeError: Cannot read property 'forEach' of undefined
getWasted   @   7.7.js:149515
printWasted @   7.7.js:149666
(anonymous function)    @   VM508:1
</code></pre></div>
<p dir="auto">The failure is on this line: <code class="notranslate">flushHistory.forEach(function (flush) {</code>.</p>
<p dir="auto">The same behaviour occurs for all other <code class="notranslate">print*</code> method such as <code class="notranslate">printInclusive()</code> and <code class="notranslate">printExclusive()</code>.<br>
The same behaviour occurs if I put the commands into my code (ie. NOT running in the Chrome Console).</p>