From 69ac59fb72533b5443073b0b7a86ce0216b10856 Mon Sep 17 00:00:00 2001 From: Kuba Orlik Date: Wed, 24 Nov 2021 22:03:56 +0100 Subject: [PATCH] Sort requests by priority in HAR converter --- report-window/har-converter.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/report-window/har-converter.tsx b/report-window/har-converter.tsx index 189151a..c132068 100644 --- a/report-window/har-converter.tsx +++ b/report-window/har-converter.tsx @@ -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",