Skip to content

Commit b9b7785

Browse files
authored
Fix #653, #659 - Fix UI to work with most recent calls first (#668)
Fixes both #653 and #659 by updating the UI to work with the recent-trace-first sorting introduced in #550
1 parent 105d9e5 commit b9b7785

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/MiniProfiler.Shared/ui/lib/MiniProfiler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,13 +430,13 @@ namespace StackExchange.Profiling {
430430
<td colspan="3" class="mp-results-none">(no client timings)</td>`) + `
431431
</tr>`);
432432
});
433-
document.querySelector('.mp-results-index').insertAdjacentHTML('beforeend', html);
433+
document.querySelector('.mp-results-index').insertAdjacentHTML('afterbegin', html);
434434
const oldId = id;
435435
const oldData = data;
436436
setTimeout(() => {
437437
let newId = oldId;
438438
if (oldData.length > 0) {
439-
newId = oldData[oldData.length - 1].Id;
439+
newId = oldData[0].Id;
440440
}
441441
updateGrid(newId);
442442
}, 4000);

0 commit comments

Comments
 (0)