Skip to content

Commit

Permalink
Only attempt to clear measures if we created the measure (facebook#9451)
Browse files Browse the repository at this point in the history
This fixes an issue where if we decided not to create a measurement we would clear ALL measurements from the performance entry buffer due to passing `undefined` as the entry name.
  • Loading branch information
chrisui authored and flarnie committed Jun 7, 2017
1 parent 15dcadf commit 71cb44d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/renderers/shared/ReactDebugTool.js
Expand Up @@ -291,7 +291,9 @@ function markEnd(debugID, markType) {
}

performance.clearMarks(markName);
performance.clearMeasures(measurementName);
if (measurementName) {
performance.clearMeasures(measurementName);
}
}

var ReactDebugTool = {
Expand Down

0 comments on commit 71cb44d

Please sign in to comment.