Skip to content

Commit 22ab303

Browse files
Profiler totals rows are not part of results.
The previous code had the chance of removing the profiler-totals when the max traces to show limit is hit, due to the profiler-results with profiler-totals row being the first row.
1 parent d2228ae commit 22ab303

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/html/includes.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,10 +285,10 @@ var _MiniProfiler = (function() {
285285
}); // limit count
286286

287287
if (
288-
container.querySelectorAll(".profiler-result").length >
288+
container.querySelectorAll(".profiler-result:not(:has(.profiler-totals))").length >
289289
options.maxTracesToShow
290290
) {
291-
var elem = container.querySelector(".profiler-result");
291+
var elem = container.querySelector('.profiler-result:not(:has(.profiler-totals))');
292292

293293
if (elem) {
294294
elem.parentElement.removeChild(elem);

0 commit comments

Comments
 (0)