mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
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:
committed by
Dan Abramov
parent
ac9d698636
commit
f6c4fe6cbb
@@ -305,7 +305,9 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
performance.clearMarks(markName);
|
||||
performance.clearMeasures(measurementName);
|
||||
if (measurementName) {
|
||||
performance.clearMeasures(measurementName);
|
||||
}
|
||||
};
|
||||
|
||||
ReactDebugTool = {
|
||||
|
||||
Reference in New Issue
Block a user