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.
This commit is contained in:
Chris Pearce
2017-04-18 14:31:47 +01:00
committed by Dan Abramov
parent ac9d698636
commit f6c4fe6cbb
+3 -1
View File
@@ -305,7 +305,9 @@ if (__DEV__) {
}
performance.clearMarks(markName);
performance.clearMeasures(measurementName);
if (measurementName) {
performance.clearMeasures(measurementName);
}
};
ReactDebugTool = {