Skip to content

Commit

Permalink
Only attempt to clear measures if we created the measure (#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 gaearon committed Apr 18, 2017
1 parent ac9d698 commit f6c4fe6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/renderers/shared/ReactDebugTool.js
Expand Up @@ -305,7 +305,9 @@ if (__DEV__) {
}

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

ReactDebugTool = {
Expand Down

0 comments on commit f6c4fe6

Please sign in to comment.