Remove the protective clause that is now unnecessary

Instead, we fixed the callsites to stop emitting events for empty components.
This commit is contained in:
Dan Abramov
2016-05-12 00:50:18 +01:00
parent d80723b237
commit f0594d2792
+1 -7
View File
@@ -236,17 +236,11 @@ function getWasted(flushHistory = getFlushHistory()) {
function getOperations(flushHistory = getFlushHistory()) {
var stats = [];
flushHistory.forEach((flush, flushIndex) => {
var {operations, treeSnapshot} = flush;
operations.forEach(operation => {
var {instanceID, type, payload} = operation;
var {displayName, ownerID} = instanceID !== 0 ?
treeSnapshot[instanceID] :
// Empty components may appear in some operation logs.
{displayName: '#empty', ownerID: null};
var {displayName, ownerID} = treeSnapshot[instanceID];
var owner = treeSnapshot[ownerID];
var key = (owner ? owner.displayName + ' > ' : '') + displayName;