@samitouri / QOS-React / commits / f6c4fe6cbb

Only attempt to clear measures if we created the measure (#9451)

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.

Chris Pearce committed Apr 18, 2017 at 14:31 UTC f6c4fe6cbbdca375b50ac10373007a9b74279e95
1 file changed +3 -1
src/renderers/shared/ReactDebugTool.js
+3 -1
@@ -305,7 +305,9 @@ if (__DEV__) {
305 }
306
307 performance.clearMarks(markName);
308 - performance.clearMeasures(measurementName);
308 + if (measurementName) {
309 + performance.clearMeasures(measurementName);
310 + }
311 };
312
313 ReactDebugTool = {