Sort requests by priority in HAR converter

This commit is contained in:
Kuba Orlik 2021-11-24 22:03:56 +01:00
parent b799592213
commit 69ac59fb72

View File

@ -22,7 +22,9 @@ function handleNewFile(
}
function generateFakeHAR(entries: StolenDataEntry[]) {
const requests = entries.map((entry) => entry.request);
const requests = entries
.sort((entry1, entry2) => entry2.getPriority() - entry1.getPriority())
.map((entry) => entry.request);
return {
log: {
version: "1.2",