mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +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:
1 parent
ac9d698636
commit
f6c4fe6cbb
1 file changed
+3
-1
@@ -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