Skip to content

Commit a6b51ed

Browse files
chrisuiflarnie
authored andcommitted
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.
1 parent 25177ec commit a6b51ed

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/renderers/shared/ReactDebugTool.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,9 @@ function markEnd(debugID, markType) {
291291
}
292292

293293
performance.clearMarks(markName);
294-
performance.clearMeasures(measurementName);
294+
if (measurementName) {
295+
performance.clearMeasures(measurementName);
296+
}
295297
}
296298

297299
var ReactDebugTool = {

0 commit comments

Comments
 (0)