Skip to content

Commit

Permalink
fix(summary): fix sort for lhs & rhs file list in summary generation
Browse files Browse the repository at this point in the history
  • Loading branch information
boxsnake committed Jul 15, 2024
1 parent 89cd126 commit cfc7af3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions util/compare.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ async function revalidateCompareSummary(summary = [], lhsQueue = null, rhsQueue

function resortCompareSummary(summary = []) {
return _.map(summary, v => {
const lhs = _.chain(v.lhs || []).flattenDeep().sortBy((a, b) => a && b && StringNaturalCompare(a.filename, b.filename)).value();
const rhs = _.chain(v.rhs || []).flattenDeep().sortBy((a, b) => a && b && StringNaturalCompare(a.filename, b.filename)).value();
const lhs = _.chain(v.lhs || []).flattenDeep().value().sort((a, b) => StringNaturalCompare(a.filename, b.filename));
const rhs = _.chain(v.rhs || []).flattenDeep().value().sort((a, b) => StringNaturalCompare(a.filename, b.filename));
v.lhs = lhs;
v.rhs = rhs;
return v;
Expand Down

0 comments on commit cfc7af3

Please sign in to comment.