mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-18 14:31:30 +03:00
Fix sorting for commit messages
This commit is contained in:
parent
6200b950c6
commit
a4a05b0c4c
@ -86,7 +86,7 @@ export function buildDiff(hunks: Hunk[], limit: number) {
|
|||||||
function shuffle<T>(items: T[]): T[] {
|
function shuffle<T>(items: T[]): T[] {
|
||||||
return items
|
return items
|
||||||
.map((item) => ({ item, value: Math.random() }))
|
.map((item) => ({ item, value: Math.random() }))
|
||||||
.sort()
|
.sort(({ value: a }, { value: b }) => a - b)
|
||||||
.map((item) => item.item);
|
.map((item) => item.item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user