Remove the protective clause that is now unnecessary
Instead, we fixed the callsites to stop emitting events for empty components.
Dan Abramov committed
May 12, 2016 at 00:49 UTC
f0594d2792a699c35c8620ae81d010b2bb88f4d1
1 file changed
+1
-7
src/isomorphic/ReactPerf.js
+1
-7
@@ -236,17 +236,11 @@ function getWasted(flushHistory = getFlushHistory()) {
236
237
function getOperations(flushHistory = getFlushHistory()) {
238
var stats = [];
239
-
239
flushHistory.forEach((flush, flushIndex) => {
240
var {operations, treeSnapshot} = flush;
242
-
241
operations.forEach(operation => {
242
var {instanceID, type, payload} = operation;
245
- var {displayName, ownerID} = instanceID !== 0 ?
246
- treeSnapshot[instanceID] :
247
- // Empty components may appear in some operation logs.
248
- {displayName: '#empty', ownerID: null};
249
-
243
+ var {displayName, ownerID} = treeSnapshot[instanceID];
244
var owner = treeSnapshot[ownerID];
245
var key = (owner ? owner.displayName + ' > ' : '') + displayName;
246