From 82faa95198423dc974bea26277fb549da26eb5c2 Mon Sep 17 00:00:00 2001 From: Andy Durant Date: Wed, 6 Mar 2024 17:13:49 +0000 Subject: [PATCH] feat(reporter): Sort license finding paths with localeCompare Use localeCompare to sort paths textually. Signed-off-by: Andy Durant --- .../web-app-template/src/components/PackageFindingsTable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/reporters/web-app-template/src/components/PackageFindingsTable.js b/plugins/reporters/web-app-template/src/components/PackageFindingsTable.js index 2200cb766f2bf..6d22fce2f16ef 100644 --- a/plugins/reporters/web-app-template/src/components/PackageFindingsTable.js +++ b/plugins/reporters/web-app-template/src/components/PackageFindingsTable.js @@ -204,7 +204,7 @@ const PackageFindingsTable = (props) => { dataIndex: 'path', defaultSortOrder: 'ascend', key: 'path', - sorter: (a, b) => a.path.length - b.path.length, + sorter: (a, b) => a.path.localeCompare(b.path), textWrap: 'word-break', title: 'Path' },